---
title: Web3
description: Cloudflare offers gateways to various networks to help Web3 developers do what they do best, develop applications without having to worry about running infrastructure.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/web3/index.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Web3

Develop Web3 applications without having to worry about running infrastructure

 Add-on feature 

Web3, or the distributed web, is a set of technologies that enables hosting of content and web applications in a serverless manner by leveraging distributed systems and consensus protocols.

Note

Enterprise customers can preview this product as a [non-contract service](https://developers.cloudflare.com/billing/preview-services/), which provides full access, free of metered usage fees, limits, and certain other restrictions.

---

## Features

### IPFS Gateway

 Paid add-on 

Provides a read-only, HTTP-accessible interface to the [Interplanetary File System (IPFS)](https://developers.cloudflare.com/web3/ipfs-gateway/concepts/ipfs/).

[ Use IPFS Gateway ](https://developers.cloudflare.com/web3/ipfs-gateway/) 

### Ethereum Gateway

 Paid add-on 

Gives you read and write access to the [Ethereum network](https://developers.cloudflare.com/web3/ethereum-gateway/concepts/ethereum/) without installing any software on your computer.

[ Use Ethereum Gateway ](https://developers.cloudflare.com/web3/ethereum-gateway/) 

---

## Benefits

Cloudflare's Web3 gateways provide HTTP-accessible interfaces to Web3 networks, providing:

* **Ease of access**: Access content from Web3 networks without installing or running any special software.
* **Security**: Get the protection benefits of Cloudflare's global anycast network for [enhanced security ↗](https://blog.cloudflare.com/cloudflare-thwarts-17-2m-rps-ddos-attack-the-largest-ever-reported/).
* **Reduced maintenance**: Cloudflare — and not your developers — maintains and monitors security, reliability, and performance.
* **Reliability**: Cloudflare's global anycast network provides a high level of [reliability and availability ↗](https://www.cloudflare.com/network/).
* **Performance**: With Cloudflare's edge network of data centers in [hundreds of cities worldwide ↗](https://www.cloudflare.com/network/), content can be cached and served from data centers close to your end users.

---

## More resources

[Plans](https://www.cloudflare.com/plans/#overview) 

Compare available Cloudflare plans

[Pricing](https://dash.cloudflare.com/?to=/:account/:zone/web3/) 

Explore pricing options for Web3 Gateways in the dashboard

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/web3/","name":"Web3"}}]}
```

---

---
title: About
description: When you create a gateway, Cloudflare automatically creates and adds specific DNS records to your Cloudflare account.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/web3/about.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# About

When you [create a gateway](https://developers.cloudflare.com/web3/how-to/manage-gateways/#create-a-gateway), Cloudflare automatically creates and adds specific [DNS records](https://developers.cloudflare.com/web3/reference/gateway-dns-records/) to your Cloudflare account.

When the hostname associated with your gateway receives requests, its DNS records route these requests to a Cloudflare Workers script.

![Cloudflare's Web3 gateways provide HTTP-accessible interfaces to the IPFS and Ethereum networks. For more details, continue reading.](https://developers.cloudflare.com/_astro/web3-gateway-flow-diagram.C8S74hHM_261bFb.webp) 

## Read operations

If the API call to the Worker is a read operation and the requested content is cached, the Workers script will respond with the requested information via HTTP to the client.

If the requested content is not cached, it will first be requested via API call to Cloudflare IPFS or Ethereum nodes, cached at the edge for future requests, and returned via HTTP response to the client.

## Write operations

_Only available for gateways to EVM-based chains, such as [Ethereum](https://developers.cloudflare.com/web3/how-to/use-ethereum-gateway)._

If the API call to the gateway is a write operation, the gateway will make an API call to one of the Cloudflare nodes, and the transaction is placed in the local mempool and propagated to peers.

A transaction ID is returned to the gateway, which is then returned to the client via HTTP response. Validators take transactions from the mempool and place them into a block to execute. The new block to add to the blockchain is validated, consensus is reached, and the block is added to the blockchain and propagated to the rest of the network.

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/web3/","name":"Web3"}},{"@type":"ListItem","position":3,"item":{"@id":"/web3/about/","name":"About"}}]}
```

---

---
title: Get started
description: Use this tutorial to start using Cloudflare's Web3 Gateways to the IPFS and Ethereum networks.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/web3/get-started.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Get started

Use this tutorial to start using Cloudflare's Web3 Gateways to the IPFS and Ethereum networks.

## Before you begin

Before you start, make sure the you have [set up an account](https://developers.cloudflare.com/fundamentals/account/) and [added your website](https://developers.cloudflare.com/fundamentals/manage-domains/add-site/) to Cloudflare.

## Step 1 - Subscribe to a gateway

To get access to Web3 gateways for your account, you need to first [subscribe to a gateway](https://developers.cloudflare.com/web3/how-to/enable-gateways/).

## Step 2 - Create a gateway

After purchasing a gateway subscription, create a gateway.

Create via dashboard

To create a gateway using the dashboard:

1. In the Cloudflare dashboard, go to the **Web3** page.  
[ Go to **Web3** ](https://dash.cloudflare.com/?to=/:account/:zone/web3)
2. Click **Create Gateway**.
3. Enter the following information:
* **Hostname**: Enter a hostname to use as your gateway, which has to be a subdomain of the current Cloudflare zone.
* **Gateway Description**: Enter a description to help distinguish between different gateways.
* **Gateway Type**: Select a gateway target of [IPFS DNSLink](https://developers.cloudflare.com/web3/ipfs-gateway/concepts/dnslink/), [IPFS Universal Path](https://developers.cloudflare.com/web3/ipfs-gateway/concepts/universal-gateway/), or [Ethereum](https://developers.cloudflare.com/web3/ethereum-gateway/).
* **DNSLink**: Only applicable to IPFS gateways, more details at [DNSLink](https://developers.cloudflare.com/web3/ipfs-gateway/concepts/dnslink/#how-is-it-used-with-cloudflare).
1. Click **Deploy**.

Create via API

To create a gateway using the API, send a [POST](https://developers.cloudflare.com/api/resources/web3/subresources/hostnames/methods/create/) request that includes the following parameters:

* `name`: The hostname that will point to the target gateway via a `CNAME` record.
* `target`: The gateway target for the hostname (`ethereum`, `ipfs`, `ipfs_universal_path`).

If you need help with API authentication, refer to [Cloudflare API documentation](https://developers.cloudflare.com/fundamentals/api/).

Request

```

curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/web3/hostnames" \

--header "X-Auth-Email: <EMAIL>" \

--header "X-Auth-Key: <API_KEY>" \

--header "Content-Type: application/json" \

--data '{

  "name": "gateway.example.com",

  "description": "This is my IPFS gateway.",

  "target": "ipfs",

  "dnslink": "/ipns/onboarding.ipfs.cloudflare.com"

}'


```

The response contains the complete definition of the new gateway.

Response

```

{

  "success": true,

  "errors": [],

  "messages": [],

  "result": {

    "id": "<WEB3_GATEWAY_ID>",

    "name": "gateway.example.com",

    "description": "This is my IPFS gateway.",

    "status": "active",

    "target": "ipfs",

    "dnslink": "/ipns/onboarding.ipfs.cloudflare.com",

    "created_on": "<CREATED_ON_DATE>",

    "modified_on": "<MODIFIED_ON_DATE>"

  }

}


```

When you create a gateway, Cloudflare automatically:

* Creates and adds [records to your Cloudflare DNS](https://developers.cloudflare.com/web3/reference/gateway-dns-records/) so your gateway can receive and route traffic appropriately.
* [Proxies](https://developers.cloudflare.com/dns/proxy-status/) traffic to that hostname.
* Issues an SSL/TLS certificate to cover the specified hostname.

## Step 3 - Customize Cloudflare settings

Once your gateway becomes [active](https://developers.cloudflare.com/web3/reference/gateway-status/), you can customize the Cloudflare settings associated with your hostname.

Since your traffic is automatically proxied through Cloudflare, you customize your website settings to take advantage of various [security, performance, and reliability](https://developers.cloudflare.com/fundamentals/concepts/how-cloudflare-works/#cloudflare-as-a-reverse-proxy) benefits.

## Step 4 - Restrict gateway access (optional)

If you are using your gateway for backend services, you may want to use Cloudflare Zero Trust to [restrict gateway access](https://developers.cloudflare.com/web3/how-to/restrict-gateway-access/).

## Step 5 - Set up usage notifications

Since this is a service with [usage-based billing](https://developers.cloudflare.com/billing/usage-based-billing/), Cloudflare recommends that you set up usage-based billing notifications to avoid unexpected bills.

To set up those notifications:

1. In the Cloudflare dashboard, go to the **Notifications** page.  
[ Go to **Notifications** ](https://dash.cloudflare.com/?to=/:account/notifications)
2. On **Alert Type** of **Usage Based Billing**, click **Select**.
3. Fill out the following information:  
   * **Name**  
   * **Product**  
   * **Notification limit** (exact metric will vary based on product)  
   * **Notification email**  
Note  
Some plans also have access to alerts through [PagerDuty](https://developers.cloudflare.com/notifications/get-started/configure-pagerduty/) and [Webhooks](https://developers.cloudflare.com/notifications/get-started/configure-webhooks/).
4. Select **Save**.

## Step 6 - Use the gateway

Once you have created a gateway and updated your Cloudflare settings, you can start using your [IPFS](https://developers.cloudflare.com/web3/how-to/use-ipfs-gateway/) or [Ethereum](https://developers.cloudflare.com/web3/how-to/use-ethereum-gateway/).

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/web3/","name":"Web3"}},{"@type":"ListItem","position":3,"item":{"@id":"/web3/get-started/","name":"Get started"}}]}
```

---

---
title: IPFS Gateway
description: Cloudflare's IPFS gateway provides a read-only, HTTP-accessible interface to the Interplanetary File System (IPFS). This gateway does not require you to download any special software or give up any storage space on your computer.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/web3/ipfs-gateway/index.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# IPFS Gateway

Cloudflare's IPFS gateway provides a read-only, HTTP-accessible interface to the [Interplanetary File System (IPFS)](https://developers.cloudflare.com/web3/ipfs-gateway/concepts/ipfs/). This gateway does not require you to download any special software or give up any storage space on your computer.

* [ Concepts ](https://developers.cloudflare.com/web3/ipfs-gateway/concepts/)
* [ Reference ](https://developers.cloudflare.com/web3/ipfs-gateway/reference/)
* [ Troubleshooting ](https://developers.cloudflare.com/web3/ipfs-gateway/troubleshooting/)

## Availability

| Free                                         | Pro                                                                              | Business                                                                         | Enterprise                                                                       |                                                                                                                                                                                       |
| -------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Availability                                 | Yes (Usage-based billing)                                                        | Yes (Usage-based billing)                                                        | Yes (Usage-based billing)                                                        | Yes (Usage-based billing)                                                                                                                                                             |
| Total gateways                               | 15                                                                               | 15                                                                               | 15                                                                               | Unlimited                                                                                                                                                                             |
| Gateway types                                | [DNSLink](https://developers.cloudflare.com/web3/ipfs-gateway/concepts/dnslink/) | [DNSLink](https://developers.cloudflare.com/web3/ipfs-gateway/concepts/dnslink/) | [DNSLink](https://developers.cloudflare.com/web3/ipfs-gateway/concepts/dnslink/) | [DNSLink](https://developers.cloudflare.com/web3/ipfs-gateway/concepts/dnslink/),[Universal Gateway](https://developers.cloudflare.com/web3/ipfs-gateway/concepts/universal-gateway/) |
| Included bandwidth (without additional cost) | 50 GB data transfer                                                              | 50 GB data transfer                                                              | 50 GB data transfer                                                              | 100 GB data transfer                                                                                                                                                                  |
| File size limit                              | None                                                                             | None                                                                             | None                                                                             | None                                                                                                                                                                                  |

Note

For more pricing details, refer to the [Web3 product page ↗](https://www.cloudflare.com/application-services/products/web3/).

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/web3/","name":"Web3"}},{"@type":"ListItem","position":3,"item":{"@id":"/web3/ipfs-gateway/","name":"IPFS Gateway"}}]}
```

---

---
title: DNSLink gateways
description: When you set up a gateway with a DNSLink record, that gateway is restricted to a particular piece of content (either a specific Content Identifier (CID) or an Interplanetary Name Service (IPNS) hostname).
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/web3/ipfs-gateway/concepts/dnslink.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# DNSLink gateways

When you set up a gateway with a DNSLink record, that gateway is restricted to a particular piece of content (either a specific Content Identifier (CID) or an Interplanetary Name Service (IPNS) hostname).

A gateway with a DNSLink - otherwise known as a _restricted gateway_ \- differs from a [universal gateway](https://developers.cloudflare.com/web3/ipfs-gateway/concepts/universal-gateway/), which allows users to access any content hosted on the IPFS network.

## What is it?

When you import anything to the [IPFS](https://developers.cloudflare.com/web3/ipfs-gateway/concepts/ipfs/), that item gets a unique content identifier ([CID ↗](https://docs.ipfs.io/concepts/glossary/#cid)) similar to `bafybeiaysi4s6lnjev27ln5icwm6tueaw2vdykrtjkwiphwekaywqhcjze`.

Such a long CID can cause issues when you want others to be able to access a website hosted on IPFS (`https://cf-ipfs.com/ipfs/bafybeiaysi4s6lnjev27ln5icwm6tueaw2vdykrtjkwiphwekaywqhcjze`). It is a similar problem to websites in general, where end users would have difficulty remembering an IP address (`192.0.2.1`) instead of a domain name (`google.com`).

The problem is solved the same way, via a DNS record. To make a website hosted on IPFS more accessible, you can put your entire website inside of a directory and create a **DNSLink** record for that CID. End users can then make requests to a Universal Gateway URL like `https://cf-ipfs.com/ipns/en.wikipedia-on-ipfs.org/` and have their requests translated to the correct CID in the background.

DNSLink records also help with content maintenance. When a new version of your website is ready to be published, you can update your DNSLink DNS record to point to the new CID and the gateway will start serving the new version automatically.

Note

For additional details, refer to the official [IPFS documentation ↗](https://docs.ipfs.tech/concepts/dnslink/).

## How is it used with Cloudflare?

You have the option to specify the DNSLink when you [create an IPFS gateway](https://developers.cloudflare.com/web3/how-to/manage-gateways/#create-a-gateway), which serves as a custom hostname that directs users to a website already hosted on IPFS.

By default, your DNSLink path is `/ipns/onboarding.ipfs.cloudflare.com`. If you choose to put your website in a different content folder hosted at your own IPFS node or with a pinning service, you will need to specify that value.

For example, the default DNSLink record for `www.example.com` would look like this:

| Record type | Name                      | Content                                      |
| ----------- | ------------------------- | -------------------------------------------- |
| TXT         | \_dnslink.www.example.com | dnslink=/ipns/onboarding.ipfs.cloudflare.com |

For more details about the DNS records created by the IPFS gateway, refer to [Gateway DNS records](https://developers.cloudflare.com/web3/reference/gateway-dns-records/).

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/web3/","name":"Web3"}},{"@type":"ListItem","position":3,"item":{"@id":"/web3/ipfs-gateway/","name":"IPFS Gateway"}},{"@type":"ListItem","position":4,"item":{"@id":"/web3/ipfs-gateway/concepts/","name":"Concepts"}},{"@type":"ListItem","position":5,"item":{"@id":"/web3/ipfs-gateway/concepts/dnslink/","name":"DNSLink gateways"}}]}
```

---

---
title: Interplanetary File System (IPFS)
description: The Interplanetary File System (IPFS) is a distributed file storage protocol that allows computers all over the globe to store and serve files as part of a giant peer-to-peer network.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/web3/ipfs-gateway/concepts/ipfs.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Interplanetary File System (IPFS)

The Interplanetary File System (IPFS) is a distributed file storage protocol that allows computers all over the globe to store and serve files as part of a giant peer-to-peer network.

Any computer, anywhere in the world, can download the IPFS software and start hosting and serving files.

If someone runs IPFS on their computer and uploads a file to the IPFS network, that file can be viewed and downloaded by anyone else in the world who is also running IPFS.

## Content Identifiers

Every file added to IPFS is given a unique address derived from a hash of the file's content. This address is called a Content Identifier (CID) and it combines the hash of the file and a unique identifier for the hash algorithm used into a single string.

IPFS currently uses [SHA-256 ↗](https://en.wikipedia.org/wiki/SHA-2) by default, which produces a 256 bit (32 byte) output, and that output is encoded with [Base58 ↗](https://en.wikipedia.org/wiki/Base58). Base58 is a binary-to-text encoding scheme originally developed for Bitcoin and has the advantage that letters that might be mistaken for each other in certain fonts (like zero and the capital letter O) are not included.

A CID will typically look something like `QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco`.

However, the same hash could be encoded with [Base32 ↗](https://en.wikipedia.org/wiki/Base32) or other supported hash algorithms including [SHA-3 ↗](https://en.wikipedia.org/wiki/SHA-3) and [BLAKE2 ↗](https://en.wikipedia.org/wiki/BLAKE%5F%28hash%5Ffunction%29).

## Uploading to IPFS

IPFS is fundamentally a [Distributed Hash Table (DHT) ↗](https://en.wikipedia.org/wiki/Distributed%5Fhash%5Ftable) which maps from CIDs to people who have the content addressed by that CID. The hash table is distributed because no single node in the network holds the entire table. Instead, each node stores a subset of the hash table, as well as information about which nodes are storing other relevant sections.

When someone talks about 'uploading' content to IPFS, what they really mean (usually) is that they are announcing to the network that they have some content by adding an entry to the DHT that maps from CID to their IP address. Somebody else who wants to download their data would look up the CID in the DHT, find the person's IP address, and download the data directly from them.

The speed and reliability advantages of IPFS come from the fact that many people can upload the same data, and then downloads will be spread between all of them. If any one of them goes offline or decides to stop hosting the data, the others can pick up the slack.

## Directories

You can upload more than just individual files. For example, consider a folder called `example`, which has exactly one file, `example_text.txt`, containing the string `I'm trying out IPFS`.

If that folder were uploaded with the command `ipfs add -r ./example`, both the folder and the file it contains would have their own CID. In this case, the folder would have the CID `QmdbaSQbGU6Wo9i5LyWWVLuU8g6WrYpWh2K4Li4QuuE8Fr` while the file would have the CID `QmXnnyufdzAWL5CqZ2RnSNgPbvCc1ALT73s6epPrRnZ1Xy`.

You could then access the file in two ways:

* Requesting the file directly:  
`https://cloudflare-ipfs.com/ipfs/QmXnnyufdzAWL5CqZ2RnSNgPbvCc1ALT73s6epPrRnZ1Xy`
* Requesting the file by name, from the directory:  
`https://cloudflare-ipfs.com/ipfs/QmdbaSQbGU6Wo9i5LyWWVLuU8g6WrYpWh2K4Li4QuuE8Fr/example_text.txt`

While the CID of a file will only change if the file itself changes, the CID of a directory changes any time **any** of the files in it change, or if any files are added/removed.

Directories make it possible to address an entire static website with a single CID and access different pages of the website by requesting different files in the directory.

## Related resources

For help with additional concepts, refer to the [IPFS ↗](https://docs.ipfs.tech/concepts/) documentation.

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/web3/","name":"Web3"}},{"@type":"ListItem","position":3,"item":{"@id":"/web3/ipfs-gateway/","name":"IPFS Gateway"}},{"@type":"ListItem","position":4,"item":{"@id":"/web3/ipfs-gateway/concepts/","name":"Concepts"}},{"@type":"ListItem","position":5,"item":{"@id":"/web3/ipfs-gateway/concepts/ipfs/","name":"Interplanetary File System (IPFS)"}}]}
```

---

---
title: Universal Path gateway
description: When you set up a Universal Path gateway — a gateway without a DNSLink record — you are creating an unrestricted gateway that allows users to access any content hosted on the IPFS network.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/web3/ipfs-gateway/concepts/universal-gateway.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Universal Path gateway

When you set up a Universal Path gateway — a gateway without a _DNSLink_ record — you are creating an unrestricted gateway that allows users to access any content hosted on the IPFS network.

This differs from a [restricted gateway](https://developers.cloudflare.com/web3/ipfs-gateway/concepts/dnslink/), which restricts the gateway to a particular piece of content (either a specific Content Identifier (CID) or an Interplanetary Name Service (IPNS) hostname).

## How is it used with Cloudflare?

You can add a Universal Path gateway just as you would [create any gateway](https://developers.cloudflare.com/web3/how-to/manage-gateways/).

Likely, you will also want to add items to the [gateway blocklist](https://developers.cloudflare.com/web3/how-to/manage-gateways/#update-blocklist), which allows you to block content access through the Universal Path gateway for one or more:

* CIDs (`QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB`)
* IPFS content (`/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG/readme`)
* IPNS content paths (`/ipns/example.com`)

Note

This feature is limited to specific plans. For more detail, refer to [Limits](https://developers.cloudflare.com/web3/reference/limits/).

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/web3/","name":"Web3"}},{"@type":"ListItem","position":3,"item":{"@id":"/web3/ipfs-gateway/","name":"IPFS Gateway"}},{"@type":"ListItem","position":4,"item":{"@id":"/web3/ipfs-gateway/concepts/","name":"Concepts"}},{"@type":"ListItem","position":5,"item":{"@id":"/web3/ipfs-gateway/concepts/universal-gateway/","name":"Universal Path gateway"}}]}
```

---

---
title: Automated deployments
description: Static sites are easy to deploy automatically. The code of the site is usually kept in a Git repository and deployed by pushing the latest commit to a repository that's connected to a Continuous Integration service like Travis CI, or by pushing to a repository directly on the server and activating a post-receive hook. Either way, the production version of the site is built and then copied into the serving path of an Apache or NGINX instance.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/web3/ipfs-gateway/reference/automated-deployment.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Automated deployments

Static sites are easy to deploy automatically. The code of the site is usually kept in a Git repository and deployed by pushing the latest commit to a repository that's connected to a Continuous Integration service like [Travis CI ↗](https://travis-ci.org/), or by pushing to a repository directly on the server and activating a post-receive hook. Either way, the production version of the site is built and then copied into the serving path of an Apache or NGINX instance.

IPFS usually fits into these systems: instead of copying the production version of a website into the serving path of an HTTP server, you would upload the same files to an IPFS node and update your DNS records with the new hash. There are several tools that help with different parts of this:

* [ipfs-deploy ↗](https://github.com/agentofuser/ipfs-deploy) helps upload data to a third-party pinning providers and automatically update Cloudflare-managed DNS records.
* [dnslink-cloudflare ↗](https://github.com/ipfs-shipyard/dnslink-cloudflare) is a script to programmatically update DNSLink records. This can be run with the `-Q` flag of `ipfs add` that only outputs the top-level hash.
* [Fission's IPFS support ↗](https://guide.fission.codes/developers/custom-domains/using-cloudflare-ipfs-gateway) lets you use the Fission IPFS app publishing system from the CLI or from GitHub Actions, while using Cloudflare-managed DNS and gateway.

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/web3/","name":"Web3"}},{"@type":"ListItem","position":3,"item":{"@id":"/web3/ipfs-gateway/","name":"IPFS Gateway"}},{"@type":"ListItem","position":4,"item":{"@id":"/web3/ipfs-gateway/reference/","name":"Reference"}},{"@type":"ListItem","position":5,"item":{"@id":"/web3/ipfs-gateway/reference/automated-deployment/","name":"Automated deployments"}}]}
```

---

---
title: Peering
description: If you are running an IPFS node that serves many requests - like a public HTTP gateway - you may be able to speed up queries by maintaining long-lived connections to nodes that provide a large volume of data.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/web3/ipfs-gateway/reference/peering-with-content-providers.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Peering

If you are running an IPFS node that serves many requests - like a public HTTP gateway - you may be able to speed up queries by maintaining long-lived connections to nodes that provide a large volume of data.

This process is known as **Peering** and you can tell IPFS to prioritize Cloudflare's peers by editing the Peering configuration in your IPFS config file.

```

{

  "Peering": {

    "Peers": [

      {

        "ID": "QmcFf2FH3CEgTNHeMRGhN7HNHU1EXAxoEk6EFuSyXCsvRE",

        "Addrs": [

          "/dnsaddr/node-1.ingress.cloudflare-ipfs.com"

        ]

      },

      {

        "ID": "QmcFmLd5ySfk2WZuJ1mfSWLDjdmHZq7rSAua4GoeSQfs1z",

        "Addrs": [

          "/dnsaddr/node-2.ingress.cloudflare-ipfs.com"

        ]

      },

      {

        "ID": "QmcfFmzSDVbwexQ9Au2pt5YEXHK5xajwgaU6PpkbLWerMa",

        "Addrs": [

          "/dnsaddr/node-3.ingress.cloudflare-ipfs.com"

        ]

      },

      {

        "ID": "QmcfJeB3Js1FG7T8YaZATEiaHqNKVdQfybYYkbT1knUswx",

        "Addrs": [

          "/dnsaddr/node-4.ingress.cloudflare-ipfs.com"

        ]

      },

      {

        "ID": "QmcfVvzK4tMdFmpJjEKDUoqRgP4W9FnmJoziYX5GXJJ8eZ",

        "Addrs": [

          "/dnsaddr/node-5.ingress.cloudflare-ipfs.com"

        ]

      },

      {

        "ID": "QmcfZD3VKrUxyP9BbyUnZDpbqDnT7cQ4WjPP8TRLXaoE7G",

        "Addrs": [

          "/dnsaddr/node-6.ingress.cloudflare-ipfs.com"

        ]

      },

      {

        "ID": "QmcfZP2LuW4jxviTeG8fi28qjnZScACb8PEgHAc17ZEri3",

        "Addrs": [

          "/dnsaddr/node-7.ingress.cloudflare-ipfs.com"

        ]

      },

      {

        "ID": "QmcfgsJsMtx6qJb74akCw1M24X1zFwgGo11h1cuhwQjtJP",

        "Addrs": [

          "/dnsaddr/node-8.ingress.cloudflare-ipfs.com"

        ]

      },

      {

        "ID": "Qmcfr2FC7pFzJbTSDfYaSy1J8Uuy8ccGLeLyqJCKJvTHMi",

        "Addrs": [

          "/dnsaddr/node-9.ingress.cloudflare-ipfs.com"

        ]

      },

      {

        "ID": "QmcfR3V5YAtHBzxVACWCzXTt26SyEkxdwhGJ6875A8BuWx",

        "Addrs": [

          "/dnsaddr/node-10.ingress.cloudflare-ipfs.com"

        ]

      },

      {

        "ID": "Qmcfuo1TM9uUiJp6dTbm915Rf1aTqm3a3dnmCdDQLHgvL5",

        "Addrs": [

          "/dnsaddr/node-11.ingress.cloudflare-ipfs.com"

        ]

      },

      {

        "ID": "QmcfV2sg9zaq7UUHVCGuSvT2M2rnLBAPsiE79vVyK3Cuev",

        "Addrs": [

          "/dnsaddr/node-12.ingress.cloudflare-ipfs.com"

        ]

      }

    ]

  }

}


```

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/web3/","name":"Web3"}},{"@type":"ListItem","position":3,"item":{"@id":"/web3/ipfs-gateway/","name":"IPFS Gateway"}},{"@type":"ListItem","position":4,"item":{"@id":"/web3/ipfs-gateway/reference/","name":"Reference"}},{"@type":"ListItem","position":5,"item":{"@id":"/web3/ipfs-gateway/reference/peering-with-content-providers/","name":"Peering"}}]}
```

---

---
title: Using IPFS with your website
description: Though it is not required, it is strongly recommended that websites hosted on IPFS use only relative links, unless linking to a different domain. This is because data can be accessed in many different (but ultimately equivalent) ways:
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/web3/ipfs-gateway/reference/updating-for-ipfs.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Using IPFS with your website

Though it is not required, it is strongly recommended that websites hosted on IPFS use only relative links, unless linking to a different domain. This is because data can be accessed in many different (but ultimately equivalent) ways:

* From your custom domain: `https://ipfs.tech/index.html`
* From a gateway: `https://cloudflare-ipfs.com/ipns/ipfs.tech/index.html`
* By immutable hash: `https://cloudflare-ipfs.com/ipfs/QmNksJqvwHzNtAtYZVqFZFfdCVciY4ojTU2oFZQSFG9U7B/index.html`

Using only relative links within a web application supports all of these at once, and gives the most flexibility to the user. The exact method for switching to relative links, if you do not use them already, depends on the framework you use.

## Angular, React, Vue

These popular JavaScript frameworks are covered in a [blog post ↗](https://medium.com/pinata/how-to-easily-host-a-website-on-ipfs-9d842b5d6a01) from [Pinata ↗](https://pinata.cloud/). They are fixed with minor config changes.

## Gatsby

Gatsby is a JavaScript framework based on React. There is a [plugin ↗](https://www.gatsbyjs.org/packages/gatsby-plugin-ipfs/) for it that ensures links are relative.

## Jekyll

Add a file `_includes/base.html` with the contents:

```

{% assign base = '' %}

{% assign depth = page.url | split: '/' | size | minus: 1 %}

{% if    depth <= 1 %}{% assign base = '.' %}

{% elsif depth == 2 %}{% assign base = '..' %}

{% elsif depth == 3 %}{% assign base = '../..' %}

{% elsif depth == 4 %}{% assign base = '../../..' %}{% endif %}


```

This snippet computes the relative path back to the root of the website from the current page. Update any pages that need to link to the root by adding this at the top:

```

{%- include base.html -%}


```

This snippet also prefixing any links with `{{base}}`. So for example, we would change`href="https://developers.cloudflare.com/css/main.css"` to be `href="https://developers.cloudflare.com/web3/ipfs-gateway/reference/updating-for-ipfs/%7B%7Bbase%7D%7D/css/main.css"`

## Generic

For other frameworks, or if a framework was not used, there's a script called [make-relative ↗](https://github.com/tmcw/make-relative) that will parse the HTML of a website and automatically rewrite links and images to be relative.

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/web3/","name":"Web3"}},{"@type":"ListItem","position":3,"item":{"@id":"/web3/ipfs-gateway/","name":"IPFS Gateway"}},{"@type":"ListItem","position":4,"item":{"@id":"/web3/ipfs-gateway/reference/","name":"Reference"}},{"@type":"ListItem","position":5,"item":{"@id":"/web3/ipfs-gateway/reference/updating-for-ipfs/","name":"Using IPFS with your website"}}]}
```

---

---
title: Troubleshooting
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/web3/ipfs-gateway/troubleshooting.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Troubleshooting

## Cloudflare-specific

### No link named "ipfs"

If you get a `no link named "ipfs" under <<CID>>` error message when trying to access content through Cloudflare's IPFS gateway, that means you have created a gateway without a value for the [DNSLink](https://developers.cloudflare.com/web3/ipfs-gateway/concepts/dnslink).

Since Cloudflare currently only supports restricted gateways - and not [universal gateways](https://developers.cloudflare.com/web3/ipfs-gateway/concepts/universal-gateway/) \- these requests will continue to fail until you specify a DNSLink value.

### Check Cloudflare's status

It is worth checking for recent incidents on Cloudflare's [status dashboard ↗](https://www.cloudflarestatus.com/) that may have affected our gateway, but the best place to get up-to-date information about issues facing IPFS is the [IPFS Discussion Forum ↗](https://discuss.ipfs.io/).

## Generic IPFS

IPFS is still a developing protocol and content is often unavailable or slow to load for reasons outside of Cloudflare's control. Usually, this happens for one of the following reasons.

### The content was uploaded to a free/anonymous pinning service.

Free and anonymous pinning services can often be used to get content on IPFS in a pinch, but they'll often stop pinning content soon after it's uploaded. Running your own server or using a pinning service are the recommended alternatives, and will keep your content online more reliably.

### No node with the requested content is online.

Content will only stay on the IPFS network as long as there's at least one node that's serving it. If all of the nodes that were serving a given piece of content go offline, the content will be inaccessible until one of them comes back online.

### The nodes with the requested content are not publicly addressable.

It's common for people who run an IPFS node on their home Wi-Fi to have very long wait times or a high rate of request failure. This is because the rest of the nodes in the IPFS network have difficulty connecting to them through their NAT (Internet router). This can be solved by setting up Port Forwarding on the router, to direct external connections to port 4001 to the host with the IPFS node, or by moving the node to a hosted server/VM.

### The nodes with the requested content are not pinning it.

If several minutes have passed since files were uploaded to an IPFS node and they're still not discoverable by other gateways, it's possible the node is having trouble announcing the files to the rest of the network. You can make sure the node with the content has pinned it by running:

```

ipfs pin -r <content id>


```

And you can force the actual announcement by running:

```

ipfs dht provide -rv <content id>


```

The second command will run indefinitely and has quite complicated output, so you may want to run it in the background and omit the `-v` flag.

### The nodes with the requested content are too old.

IPFS issues mandatory updates from time to time that introduce breaking protocol changes. Cloudflare tries to say ahead of these updates and may, as a result, lose connectivity with older nodes.

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/web3/","name":"Web3"}},{"@type":"ListItem","position":3,"item":{"@id":"/web3/ipfs-gateway/","name":"IPFS Gateway"}},{"@type":"ListItem","position":4,"item":{"@id":"/web3/ipfs-gateway/troubleshooting/","name":"Troubleshooting"}}]}
```

---

---
title: Ethereum Gateway
description: Cloudflare's Ethereum Gateway gives you read and write access to the Ethereum network without installing any software on your computer.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/web3/ethereum-gateway/index.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Ethereum Gateway

Cloudflare's Ethereum Gateway gives you read and write access to the [Ethereum network](https://developers.cloudflare.com/web3/ethereum-gateway/concepts/ethereum/) without installing any software on your computer.

In particular, users can read all information that has been agreed upon by the consensus of existing nodes in the network. In addition, they can write their own transactions and smart contracts to be stored by these nodes in a distributed manner. Anyone else on the network will be able to view these transactions, and even run your smart contracts using their own supply of the Ethereum currency.

These interactions take place through the official [Ethereum JSON-RPC API ↗](https://github.com/ethereum/execution-apis) and use [Cloudflare-supported API methods](https://developers.cloudflare.com/web3/ethereum-gateway/reference/supported-api-methods/).

## Availability

| Free                                          | Pro                       | Business                  | Enterprise                |                           |
| --------------------------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- |
| Availability                                  | Yes (Usage-based billing) | Yes (Usage-based billing) | Yes (Usage-based billing) | Yes (Usage-based billing) |
| Total gateways                                | 15                        | 15                        | 15                        | Unlimited                 |
| Included bandwidth  (without additional cost) | 500,000 HTTP requests     | 500,000 HTTP requests     | 500,000 HTTP requests     | 1,000,000 HTTP requests   |

Note

For more pricing details, refer to the [Web3 product page ↗](https://www.cloudflare.com/application-services/products/web3/).

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/web3/","name":"Web3"}},{"@type":"ListItem","position":3,"item":{"@id":"/web3/ethereum-gateway/","name":"Ethereum Gateway"}}]}
```

---

---
title: Ethereum network
description: The Ethereum network is a distributed consensus platform that allows users to
write and compute smart contracts in a distributed manner. Smart contracts are
essentially Turing complete programs that are available at a unique address of
the network. When the smart contract is run as part of a transaction, the result
and the current state of the contract are stored in a verifiable consensus that
is agreed upon by the entire network of nodes.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/web3/ethereum-gateway/concepts/ethereum.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Ethereum network

The Ethereum network is a distributed consensus platform that allows users to write and compute smart contracts in a distributed manner. Smart contracts are essentially Turing complete programs that are available at a unique address of the network. When the smart contract is run as part of a transaction, the result and the current state of the contract are stored in a verifiable consensus that is agreed upon by the entire network of nodes.

## Smart contracts

When a user wants to run a smart contract on some desired inputs, they provide currency known as ETH with their command. This currency is allocated to a specific set of nodes that contribute to adding the transaction to the distributed consensus.

If the smart contract involves moving monetary amounts to different individuals in the network then this is also recorded in the consensus. As such, this consensus represents the current state of the network along with exactly how much Ethereum currency is owned by each individual.

## Addressing

All transactions on the network are stored in 'blocks' that make up the entire consensus. In brief, the consensus is a single sequence of blocks with increasing unique identifiers that represent all the transactions in the entire history of the Ethereum platform.

Each block also has a unique hash identifier (a long hexadecimal string like`0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3q`) that can be used to retrieve and inspect the block. Each transaction within a block also has a unique hash identifier that can be used to retrieve individual transactions. When any new transaction is uploaded to the consensus as part of a block, this update is sent around the entire network and anyone can read the nature of the transaction that took place. This makes the entire state of the network accountable.

## Read and write content

To read content, a user needs to interact with a working Ethereum node. Such nodes can be run locally on a user's machine as daemons (such as:[https://github.com/ethereum/go-ethereum/ ↗](https://github.com/ethereum/go-ethereum/)). When the user accesses such a node, they can use the official JSONRPC API to send queries to the network, and learn about specific aspects of the consensus.

Writing content is just as simple, and can be done using a [single JSON command ↗](https://github.com/ethereum/wiki/wiki/JSON-RPC#eth%5Fsendrawtransaction). However, writing transactions also requires supplying a certain amount of currency along with a secret key for an [Ethereum wallet ↗](https://www.ethereum.org/use/#%5F3-what-is-a-wallet-and-which-one-should-i-use)that holds that currency. If this can be provided, then the write transaction is sent to the wider network and added to the consensus.

## Connect your website to the gateway

If you want to be able to access the Ethereum network accessible from a custom domain name, you can do that by [creating a new Ethereum Gateway](https://developers.cloudflare.com/web3/how-to/manage-gateways/#create-a-gateway).

## Related resources

If you’re interested in learning more, you can read the official [RPC documentation ↗](https://github.com/ethereum/wiki/wiki/JSON-RPC), along with the official documentation [provided by Ethereum ↗](https://www.ethereum.org/use/).

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/web3/","name":"Web3"}},{"@type":"ListItem","position":3,"item":{"@id":"/web3/ethereum-gateway/","name":"Ethereum Gateway"}},{"@type":"ListItem","position":4,"item":{"@id":"/web3/ethereum-gateway/concepts/","name":"Concepts"}},{"@type":"ListItem","position":5,"item":{"@id":"/web3/ethereum-gateway/concepts/ethereum/","name":"Ethereum network"}}]}
```

---

---
title: Node types
description: There are three widely known Ethereum nodes that are used: Full nodes, Archive nodes, and Light nodes.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/web3/ethereum-gateway/concepts/node-types.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Node types

There are three widely known Ethereum nodes that are used: Full nodes, Archive nodes, and Light nodes.

## Full nodes

Full nodes store all the blockchain’s data and participate in block validation. Validating the blockchain includes keeping track of new blocks and computing and maintaining state changes. Full nodes, once fully synced with the network, can query all Ethereum blockchain data.

## Light nodes

A light node is much smaller than a full node and does not participate in block validation in the same way. The node can query the Ethereum network but does not store the state of the chain. Because of this limitation, it relies on peering with full nodes to get accurate chain data.

## Archive nodes

An archive node is a full node that additionally maintains storage of historical blockchain states. While a full node can calculate a historical state, an archive node readily has the information in local storage and has better performance for these types of requests.

## Nodes at Cloudflare

Cloudflare's Ethereum Gateway provides access to full and archive nodes.

The archive nodes serve requests for the following [RPC state methods ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#state%5Fmethods) when the block number parameter is before the most recent 128 blocks or the default block parameter is set to “earliest”:

* [eth\_getBalance ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fgetbalance)
* [eth\_getCode ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fgetcode)
* [eth\_getTransactionCount ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fgettransactioncount)
* [eth\_getStorageAt ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fgetstorageat)
* [eth\_call ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fcall)

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/web3/","name":"Web3"}},{"@type":"ListItem","position":3,"item":{"@id":"/web3/ethereum-gateway/","name":"Ethereum Gateway"}},{"@type":"ListItem","position":4,"item":{"@id":"/web3/ethereum-gateway/concepts/","name":"Concepts"}},{"@type":"ListItem","position":5,"item":{"@id":"/web3/ethereum-gateway/concepts/node-types/","name":"Node types"}}]}
```

---

---
title: Kill Switches
description: When writing contracts, be especially careful to write secure code and include a
kill switch to ensure that if any bugs do reside in the code, they can be
squashed. If you do not include a kill switch and there are vulnerabilities in
the smart contract that can be exploited, this can lead to the theft of
resources from the smart contract or from other individuals.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/web3/ethereum-gateway/reference/kill-switches.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Kill Switches

When writing contracts, be especially careful to write secure code and include a kill switch to ensure that if any bugs do reside in the code, they can be squashed. If you do not include a kill switch and there are vulnerabilities in the smart contract that can be exploited, this can lead to the theft of resources from the smart contract or from other individuals.

This was brought into sharp focus during the [infamous DAO incident ↗](https://en.wikipedia.org/wiki/The%5FDAO%5F%28organization%29). The DAO smart contract acted as a complex, decentralized venture capital fund and held Ether worth $250 million at its peak collected from a group of investors. Hackers exploited vulnerabilities in the smart contract, stealing $50 million worth of Ether.

Because there is no way to undo transactions in Ether, there was a highly controversial “hard fork," where the majority of the community agreed to accept a block that contained an _irregular state change_ that essentially drained all DAO funds into a special “WithdrawDAO” recovery contract. By convincing enough miners to accept this irregular block as valid, the DAO was able to return investors funds. However, not everyone agreed with the chain, with those who disagreed rejecting the irregular block and forming the Ethereum Classic network, each blockchain grew independently.

## Limitations

Kill switches can cause their own problems. Like if a contract that is a library has its kill switch flipped. All contracts relying on this contract can't operate as intended even though the underlying library code is immutable. Recently, an attacker triggered a kill switch in an underlying library function that caused over 500,000 Ether to get [stuck in multi-signature wallets ↗](https://www.parity.io/security-alert-2/). Users of the multi-signature library assumed the immutability of the code meant that the library would always operate as anticipated, and accepted the block. In the wake of this, there are many tools that check smart contracts for bugs or enable bug bounties.

> Smart contracts interacting with the blockchain are only deterministic when accounting for the state of the blockchain.

## How is this different?

This is a radically different approach for providing transparency and accountability. Because all contracts and transactions are public and verified by **consensus**, trust is distributed amongst the people, rather than centralized in a few big institutions.

The trust given to institutions is historic. This history builds trustworthiness.

The trust placed in consensus-based algorithms is based on the assumption that most people are honest, or more accurately that no sufficiently large subset of people can be made to collude to produce a malicious outcome. This is the_democratisation of trust_. In the DAO attack, a majority of nodes agreed to accept an irregular state transition. This effectively undid the damage of the attack, and shows how, at least in the world of blockchain, perception is reality. Because most people “believed" -- accepted this irregular block, it became a “real” -- valid block.

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/web3/","name":"Web3"}},{"@type":"ListItem","position":3,"item":{"@id":"/web3/ethereum-gateway/","name":"Ethereum Gateway"}},{"@type":"ListItem","position":4,"item":{"@id":"/web3/ethereum-gateway/reference/","name":"Reference"}},{"@type":"ListItem","position":5,"item":{"@id":"/web3/ethereum-gateway/reference/kill-switches/","name":"Kill Switches"}}]}
```

---

---
title: Rinkeby deprecation
description: Though Cloudflare's Ethereum Gateway launched with support for the Rinkeby testnet, Rinkeby did not run through The Merge and - as a result - will no longer be a reliable staging environment for mainnet.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/web3/ethereum-gateway/reference/rinkeby-deprecation.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Rinkeby deprecation

Though Cloudflare's Ethereum Gateway launched with support for the Rinkeby testnet, Rinkeby did not run through [The Merge ↗](https://ethereum.org/en/upgrades/merge/) and - as a result - will no longer be a reliable staging environment for mainnet.

Cloudflare will be deprecating support for Rinkeby on January 30, 2023.

## Migration

To avoid any issues with your Web3 development or debugging, you should switch over to the [Sepolia testnet](https://developers.cloudflare.com/web3/ethereum-gateway/reference/supported-networks/), which is fully supported with your Ethereum Gateway.

To migrate, you should update the endpoints you use when [reading from or writing to](https://developers.cloudflare.com/web3/how-to/use-ethereum-gateway/) the Ethereum network.

For example, you might have been using the previous endpoints to interact with your Ethereum Gateway.

Previous curl

```

curl https://web3-trial.cloudflare-eth.com/v1/rinkeby \

--header 'Content-Type: application/json' \

--data '{

  "jsonrpc": "2.0",

  "method": "eth_getBlockByNumber",

  "params": ["0x2244", true],

  "id": 1

}'


```

Previous JS Fetch API

```

await fetch(

  new Request('https://web3-trial.cloudflare-eth.com/v1/rinkeby', {

    method: 'POST',

    body: JSON.stringify({

      jsonrpc: '2.0',

      method: 'eth_getBlockByNumber',

      params: ['0x2244', true],

      id: 1,

    }),

    headers: {

      'Content-Type': 'application/json',

    },

  })

).then(resp => {

  return resp.json();

});


```

To migrate away from Rinkeby, change the end of your endpoint to use another testnet.

New curl

```

curl https://web3-trial.cloudflare-eth.com/v1/sepolia \

--header 'Content-Type: application/json' \

--data '{

  "jsonrpc": "2.0",

  "method": "eth_getBlockByNumber",

  "params": ["0x2244", true],

  "id": 1

}'


```

New JS Fetch API

```

await fetch(

  new Request('https://web3-trial.cloudflare-eth.com/v1/sepolia', {

    method: 'POST',

    body: JSON.stringify({

      jsonrpc: '2.0',

      method: 'eth_getBlockByNumber',

      params: ['0x2244', true],

      id: 1,

    }),

    headers: {

      'Content-Type': 'application/json',

    },

  })

).then(resp => {

  return resp.json();

});


```

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/web3/","name":"Web3"}},{"@type":"ListItem","position":3,"item":{"@id":"/web3/ethereum-gateway/","name":"Ethereum Gateway"}},{"@type":"ListItem","position":4,"item":{"@id":"/web3/ethereum-gateway/reference/","name":"Reference"}},{"@type":"ListItem","position":5,"item":{"@id":"/web3/ethereum-gateway/reference/rinkeby-deprecation/","name":"Rinkeby deprecation"}}]}
```

---

---
title: Supported API methods
description: The full list of API methods that are supported by an Ethereum Gateway
is given below. The gateway returns a 403 if a method is specified that is not
supported.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/web3/ethereum-gateway/reference/supported-api-methods.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Supported API methods

The full list of API methods that are supported by an Ethereum Gateway is given below. The gateway returns a `403` if a method is specified that is not supported.

For a full list of JSON-RPC API methods, refer to the [JSON-RPC specification ↗](https://github.com/ethereum/execution-apis).

| JSON-RPC method                                                                                                                                | Cloudflare Ethereum Gateway support |
| ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
| [web3\_clientVersion ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#web3%5Fclientversion)                                           | ✅                                   |
| [web3\_sha3 ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#web3%5Fsha3)                                                             | ✅                                   |
| [net\_version ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#net%5Fversion)                                                         | ✅                                   |
| [net\_listening ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#net%5Flistening)                                                     | ✅                                   |
| [eth\_syncing ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fsyncing)                                                         | ✅                                   |
| [eth\_mining ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fmining)                                                           | ✅                                   |
| [eth\_gasPrice ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fgasprice)                                                       | ✅                                   |
| [eth\_feeHistory ↗](https://github.com/ethereum/execution-apis)[1](#user-content-fn-2)                                                         | ✅                                   |
| [eth\_blockNumber ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fblocknumber)                                                 | ✅                                   |
| [eth\_chainId ↗](https://github.com/ethereum/execution-apis)                                                                                   | ✅                                   |
| [eth\_getBalance ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fgetbalance)                                                   | ✅                                   |
| [eth\_getStorageAt ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fgetstorageat)                                               | ✅                                   |
| [eth\_getTransactionCount ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fgettransactioncount)                                 | ✅                                   |
| [eth\_getBlockTransactionCountByHash ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fgetblocktransactioncountbyhash)           | ✅                                   |
| [eth\_getBlockTransactionCountByNumber ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fgetblocktransactioncountbynumber)       | ✅                                   |
| [eth\_getUncleCountByBlockHash ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fgetunclecountbyblockhash)                       | ✅                                   |
| [eth\_getUncleCountByBlockNumber ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fgetunclecountbyblocknumber)                   | ✅                                   |
| [eth\_getCode ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fgetcode)                                                         | ✅                                   |
| [eth\_sendRawTransaction ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fsendrawtransaction)                                   | ✅                                   |
| [eth\_call ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fcall)                                                               | ✅                                   |
| [eth\_estimateGas ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Festimategas)                                                 | ✅                                   |
| [eth\_getBlockByHash ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fgetblockbyhash)                                           | ✅                                   |
| [eth\_getBlockByNumber ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fgetblockbynumber)                                       | ✅                                   |
| [eth\_getTransactionByHash ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fgettransactionbyhash)                               | ✅                                   |
| [eth\_getTransactionByBlockHashAndIndex ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fgettransactionbyblockhashandindex)     | ✅                                   |
| [eth\_getTransactionByBlockNumberAndIndex ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fgettransactionbyblocknumberandindex) | ✅                                   |
| [eth\_getTransactionReceipt ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fgettransactionreceipt)                             | ✅                                   |
| [eth\_getUncleByBlockHashAndIndex ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fgetunclebyblockhashandindex)                 | ✅                                   |
| [eth\_getUncleByBlockNumberAndIndex ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fgetunclebyblocknumberandindex)             | ✅                                   |
| [eth\_getLogs ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fgetlogs)[2](#user-content-fn-1)                                  | ✅                                   |
| [eth\_getWork ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fgetwork)                                                         | ✅                                   |
| [eth\_getProof ↗](https://ethereum.github.io/execution-apis/api-documentation/)                                                                | ✅                                   |
| [net\_peerCount ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#net%5Fpeercount)                                                     | ❌                                   |
| [eth\_protocolVersion ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fprotocolversion)                                         | ❌                                   |
| [eth\_coinbase ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fcoinbase)                                                       | ❌                                   |
| [eth\_hashrate ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fhashrate)                                                       | ❌                                   |
| [eth\_accounts ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Faccounts)                                                       | ❌                                   |
| [eth\_sign ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fsign)                                                               | ❌                                   |
| [eth\_sendTransaction ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fsendtransaction)                                         | ❌                                   |
| [eth\_getCompilers ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fgetcompilers)                                               | ❌                                   |
| [eth\_compileLLL ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fcompilelll)                                                   | ❌                                   |
| [eth\_compileSolidity ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fcompile%5Fsolidity)                                      | ❌                                   |
| [eth\_compileSerpent ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fcompileserpent)                                           | ❌                                   |
| [eth\_newFilter ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fnewfilter)                                                     | ❌                                   |
| [eth\_newBlockFilter ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fnewblockfilter)                                           | ❌                                   |
| [eth\_newPendingTransactionFilter ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fnewpendingtransactionfilter)                 | ❌                                   |
| [eth\_uninstallFilter ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Funinstallfilter)                                         | ❌                                   |
| [eth\_getFilterChanges ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fgetfilterchanges)                                       | ❌                                   |
| [eth\_getFilterLogs ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fgetfilterlogs)                                             | ❌                                   |
| [eth\_submitWork ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fsubmitwork)                                                   | ❌                                   |
| [eth\_submitHashrate ↗](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth%5Fsubmithashrate)                                           | ❌                                   |

## Trace methods

EVM traces are a way to track the execution of smart contracts on the Ethereum blockchain. It records all the steps taken by the Ethereum Virtual Machine (EVM) as it runs the smart contract. This includes information like the specific operation that was executed, how much gas it cost, and any changes made to the blockchain as a result. The trace module is a tool that allows developers to access and analyze these traces, which can be useful for debugging, testing, and monitoring smart contracts. It can be used to identify and fix errors, optimize performance, and gain insight into how the smart contract is interacting with the blockchain.

### trace\_filter

The `trace_filter` method retrieves the traces of multiple transactions in a single request. This method is particularly useful for debugging and monitoring specific addresses on the Ethereum blockchain.

#### Request Parameters

* `fromBlock`: `Quantity` or `Tag` \- (optional) The block number to start receiving traces from.
* `toBlock`: `Quantity` or `Tag` \- (optional) The block number to stop receiving traces at.
* `fromAddress`: `Array` \- (optional) An array of addresses to start receiving traces from.
* `toAddress`: `Address` \- (optional) An array of addresses to stop retrieving traces at.
* `after`: `Quantity` \- (optional) The offset trace number
* `count`: `Quantity` \- (optional) The amount of traces to return.

#### Returns

This method returns an `Array` of traces matching the given filter.

#### Example

trace\_filter Request

```

curl https://web3-trial.cloudflare-eth.com/v1/mainnet \

-X POST \

-H 'Content-Type: application/json' \

--data '{

    "jsonrpc":"2.0",

    "method":"trace_filter",

    "params":[

        {

            "count": 200,

            "fromBlock": "0xccb943",

            "toBlock": "0xccbc62",

            "fromAddress": [

                "0xEdC763b3e418cD14767b3Be02b667619a6374076"

            ]

        }

    ],

    "id":1

    }'


```

#### Response

```

{

  "jsonrpc": "2.0",

  "result": [

    {

      "action": {

        "from": "0xedc763b3e418cd14767b3be02b667619a6374076",

        "callType": "call",

        "gas": "0x8462",

        "input": "0x095ea7b30000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",

        "to": "0x7ff4169a6b5122b664c51c95727d87750ec07c84",

        "value": "0x0"

      },

      "blockHash": "0x351e7c06ec010c8f7e7358eb580238dd23e1e129be96822aa93ebb6da08558e6",

      "blockNumber": 13416771,

      "result": {

        "gasUsed": "0x6009",

        "output": "0x0000000000000000000000000000000000000000000000000000000000000001"

      },

      "subtraces": 0,

      "traceAddress": [],

      "transactionHash": "0x054bbb9fbb855bf23f755e548c7409f45fc5eff8a824b2ad06380bc038d7b049",

      "transactionPosition": 54,

      "type": "call"

    }

  ],

  "id": 1

}


```

### Limitations

The `trace_filter` method has some limitations to ensure that our nodes are not overloaded.

* The block range for the `trace_filter` method is limited to 800 blocks.
* The trace `count` is limited to 200

## Footnotes

1. **Limitations**: Max block count of 10\. [↩](#user-content-fnref-2)
2. **Limitations**: Max block range of 800 blocks. [↩](#user-content-fnref-1)

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/web3/","name":"Web3"}},{"@type":"ListItem","position":3,"item":{"@id":"/web3/ethereum-gateway/","name":"Ethereum Gateway"}},{"@type":"ListItem","position":4,"item":{"@id":"/web3/ethereum-gateway/reference/","name":"Reference"}},{"@type":"ListItem","position":5,"item":{"@id":"/web3/ethereum-gateway/reference/supported-api-methods/","name":"Supported API methods"}}]}
```

---

---
title: Supported networks
description: Currently, Cloudflare Ethereum gateways support interacting with the following networks.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/web3/ethereum-gateway/reference/supported-networks.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Supported networks

Currently, Cloudflare Ethereum gateways support [interacting with](https://developers.cloudflare.com/web3/how-to/use-ethereum-gateway/) the following networks.

| Network                                                   | Usage                                                                                              |
| --------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| [Ethereum Mainnet ↗](https://ethereum.org/en/enterprise/) | Append /v1/mainnet to calls to your gateway or the Cloudflare public gateway (cloudflare-eth.com). |
| [Sepolia Testnet ↗](https://sepolia.dev/)                 | Append /v1/sepolia to calls to your gateway.                                                       |

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/web3/","name":"Web3"}},{"@type":"ListItem","position":3,"item":{"@id":"/web3/ethereum-gateway/","name":"Ethereum Gateway"}},{"@type":"ListItem","position":4,"item":{"@id":"/web3/ethereum-gateway/reference/","name":"Reference"}},{"@type":"ListItem","position":5,"item":{"@id":"/web3/ethereum-gateway/reference/supported-networks/","name":"Supported networks"}}]}
```

---

---
title: API reference
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/web3/api-reference.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# API reference

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/web3/","name":"Web3"}},{"@type":"ListItem","position":3,"item":{"@id":"/web3/api-reference/","name":"API reference"}}]}
```

---

---
title: Customize Cloudflare settings
description: Once your gateway becomes active, you can customize the Cloudflare settings associated with your hostname.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/web3/how-to/customize-cloudflare-settings.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Customize Cloudflare settings

Once your gateway becomes [active](https://developers.cloudflare.com/web3/reference/gateway-status/), you can customize the Cloudflare settings associated with your hostname.

Since your traffic is automatically proxied through Cloudflare, you customize your website settings to take advantage of various [security, performance, and reliability](https://developers.cloudflare.com/fundamentals/concepts/how-cloudflare-works/#cloudflare-as-a-reverse-proxy) benefits.

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/web3/","name":"Web3"}},{"@type":"ListItem","position":3,"item":{"@id":"/web3/how-to/","name":"How to"}},{"@type":"ListItem","position":4,"item":{"@id":"/web3/how-to/customize-cloudflare-settings/","name":"Customize Cloudflare settings"}}]}
```

---

---
title: Subscribe to gateways
description: Before you can create a new gateway, you need to subscribe to one or more gateways.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/web3/how-to/enable-gateways.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Subscribe to gateways

Before you can [create a new gateway](https://developers.cloudflare.com/web3/how-to/manage-gateways/#create-a-gateway), you need to subscribe to one or more gateways.

## Create new subscription

To subscribe to a Web3 gateway (if you have not already subscribed):

1. In the Cloudflare dashboard, go to the **Web3** page.  
[ Go to **Web3** ](https://dash.cloudflare.com/?to=/:account/:zone/web3)
2. Click **Subscribe to Web3 Gateways**.
3. Choose which gateways you want to subscribe to.
4. Click **Proceed to Payment Details**.
5. Enter your payment information (if not already attached to your account) and complete your purchase.

Note

Enterprise customers can preview this product as a [non-contract service](https://developers.cloudflare.com/billing/preview-services/), which provides full access, free of metered usage fees, limits, and certain other restrictions.

## Manage existing subscription

To update an existing subscription or subscribe to an additional gateway:

1. In the Cloudflare dashboard, go to the **Web3** page.  
[ Go to **Web3** ](https://dash.cloudflare.com/?to=/:account/:zone/web3)
2. Click **Manage Subscriptions**.
3. To update existing gateway subscriptions, click **Change**. To purchase access to a new gateway, click **Subscribe**.

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/web3/","name":"Web3"}},{"@type":"ListItem","position":3,"item":{"@id":"/web3/how-to/","name":"How to"}},{"@type":"ListItem","position":4,"item":{"@id":"/web3/how-to/enable-gateways/","name":"Subscribe to gateways"}}]}
```

---

---
title: Manage gateways
description: A Cloudflare Web3 gateway provides HTTP-accessible interfaces to various Web3 networks. You can interact with a gateway in several ways.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/web3/how-to/manage-gateways.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Manage gateways

A Cloudflare Web3 gateway provides HTTP-accessible interfaces to various Web3 networks. You can interact with a gateway in several ways.

## Create a gateway

* [ Dashboard ](#tab-panel-6919)
* [ API ](#tab-panel-6920)

To create a gateway using the dashboard:

1. In the Cloudflare dashboard, go to the **Web3** page.  
[ Go to **Web3** ](https://dash.cloudflare.com/?to=/:account/:zone/web3)
2. Click **Create Gateway**.
3. Enter the following information:
* **Hostname**: Enter a hostname to use as your gateway, which has to be a subdomain of the current Cloudflare zone.
* **Gateway Description**: Enter a description to help distinguish between different gateways.
* **Gateway Type**: Select a gateway target of [IPFS DNSLink](https://developers.cloudflare.com/web3/ipfs-gateway/concepts/dnslink/), [IPFS Universal Path](https://developers.cloudflare.com/web3/ipfs-gateway/concepts/universal-gateway/), or [Ethereum](https://developers.cloudflare.com/web3/ethereum-gateway/).
* **DNSLink**: Only applicable to IPFS gateways, more details at [DNSLink](https://developers.cloudflare.com/web3/ipfs-gateway/concepts/dnslink/#how-is-it-used-with-cloudflare).
1. Click **Deploy**.

To create a gateway using the API, send a [POST](https://developers.cloudflare.com/api/resources/web3/subresources/hostnames/methods/create/) request that includes the following parameters:

* `name`: The hostname that will point to the target gateway via a `CNAME` record.
* `target`: The gateway target for the hostname (`ethereum`, `ipfs`, `ipfs_universal_path`).

If you need help with API authentication, refer to [Cloudflare API documentation](https://developers.cloudflare.com/fundamentals/api/).

Request

```

curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/web3/hostnames" \

--header "X-Auth-Email: <EMAIL>" \

--header "X-Auth-Key: <API_KEY>" \

--header "Content-Type: application/json" \

--data '{

  "name": "gateway.example.com",

  "description": "This is my IPFS gateway.",

  "target": "ipfs",

  "dnslink": "/ipns/onboarding.ipfs.cloudflare.com"

}'


```

The response contains the complete definition of the new gateway.

Response

```

{

  "success": true,

  "errors": [],

  "messages": [],

  "result": {

    "id": "<WEB3_GATEWAY_ID>",

    "name": "gateway.example.com",

    "description": "This is my IPFS gateway.",

    "status": "active",

    "target": "ipfs",

    "dnslink": "/ipns/onboarding.ipfs.cloudflare.com",

    "created_on": "<CREATED_ON_DATE>",

    "modified_on": "<MODIFIED_ON_DATE>"

  }

}


```

When you create a gateway, Cloudflare automatically:

* Creates and adds [records to your Cloudflare DNS](https://developers.cloudflare.com/web3/reference/gateway-dns-records/) so your gateway can receive and route traffic appropriately.
* [Proxies](https://developers.cloudflare.com/dns/proxy-status/) traffic to that hostname.
* Issues an SSL/TLS certificate to cover the specified hostname.

---

## Edit a gateway

Once you have [created a gateway](#create-a-gateway), you can only edit the **Gateway Description** and — if it is an **IPFS** gateway — also edit the value for the [DNSLink](https://developers.cloudflare.com/web3/ipfs-gateway/concepts/dnslink/) field.

If you need to edit other fields, [delete the gateway](#delete-a-gateway) and create a new one.

* [ Dashboard ](#tab-panel-6911)
* [ API ](#tab-panel-6912)

To edit a gateway using the dashboard:

1. In the Cloudflare dashboard, go to the **Web3** page.  
[ Go to **Web3** ](https://dash.cloudflare.com/?to=/:account/:zone/web3)
2. On a specific gateway, click **Edit**.
3. Update the **Gateway Description** and — if editing an **IPFS** gateway — the value for the [DNSLink](https://developers.cloudflare.com/web3/ipfs-gateway/concepts/dnslink/).
4. Click **Reapply**.

To edit specific settings for a gateway, use a [PATCH](https://developers.cloudflare.com/api/resources/web3/subresources/hostnames/methods/edit/) request.

---

## Refresh a gateway

When your gateway is stuck in an **Error** [status](https://developers.cloudflare.com/web3/reference/gateway-status/), you should try refreshing the gateway, which attempts to re-create the associated DNS records for the hostname.

* [ Dashboard ](#tab-panel-6913)
* [ API ](#tab-panel-6914)

To refresh a gateway using the dashboard:

1. In the Cloudflare dashboard, go to the **Web3** page.  
[ Go to **Web3** ](https://dash.cloudflare.com/?to=/:account/:zone/web3)
2. On a gateway, click the dropdown then **Refresh**.

To refresh a gateway using the API, send a [PATCH](https://developers.cloudflare.com/api/resources/web3/subresources/hostnames/methods/edit/) request with an empty request body.

---

## Update blocklist

When you set up a [IPFS Universal Path gateway](https://developers.cloudflare.com/web3/ipfs-gateway/concepts/universal-gateway/), you may want to add items to the gateway blocklist, which allows you to block access to specific content.

You have the ability to block access to one or more:

* CIDs (`QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB`)
* IPFS content paths (`/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG/readme`)
* IPNS content paths (`/ipns/example.com`)

* [ Dashboard ](#tab-panel-6915)
* [ API ](#tab-panel-6916)

To add an item to the blocklist using the dashboard:

1. In the Cloudflare dashboard, go to the **Web3** page.  
[ Go to **Web3** ](https://dash.cloudflare.com/?to=/:account/:zone/web3)
2. On a specific gateway, click the dropdown then **Blocklist**.
3. Click **Add entry**.
4. Enter the following information:  
   * **Blocklist entry type**: Choose **CID** or **Content path**.  
   * **Blocklist entry content**: Add a CID or content path to block, meaning either a valid CIDv0 or CIDv1 string (CID) or the entry should start with `/ipfs/` or `/ipns/` (content path).  
   * **Blocklist entry description**: Add a description to help you identify the blocklist entry.
5. Click **Add**.

To add a blocklist item using the API, send a [POST](https://developers.cloudflare.com/api/resources/web3/subresources/hostnames/subresources/ipfs%5Funiversal%5Fpaths/subresources/content%5Flists/subresources/entries/methods/create/) request.

---

## Delete a gateway

When you delete a gateway, Cloudflare will automatically remove all associated hostname DNS records. This action will impact your traffic and cannot be undone.

* [ Dashboard ](#tab-panel-6917)
* [ API ](#tab-panel-6918)

To delete a gateway using the dashboard:

1. In the Cloudflare dashboard, go to the **Web3** page.  
[ Go to **Web3** ](https://dash.cloudflare.com/?to=/:account/:zone/web3)
2. On a specific gateway, click the dropdown then **Remove**.
3. Click **Delete hostname**.

To delete a gateway using the API, send a [DELETE](https://developers.cloudflare.com/api/resources/web3/subresources/hostnames/methods/delete/) request.

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/web3/","name":"Web3"}},{"@type":"ListItem","position":3,"item":{"@id":"/web3/how-to/","name":"How to"}},{"@type":"ListItem","position":4,"item":{"@id":"/web3/how-to/manage-gateways/","name":"Manage gateways"}}]}
```

---

---
title: Restrict gateway access
description: If you are using a Web3 gateway for internal application calls, you may want to restrict gateway access to specific backend services.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/web3/how-to/restrict-gateway-access.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Restrict gateway access

If you are using a [Web3 gateway](https://developers.cloudflare.com/web3/about/) for internal application calls, you may want to restrict gateway access to specific backend services.

You can achieve this goal by [creating general Access policies](https://developers.cloudflare.com/cloudflare-one/access-controls/policies/) to block normal traffic and then [creating service tokens](https://developers.cloudflare.com/cloudflare-one/access-controls/service-credentials/service-tokens/) to allow access by your backend service.

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/web3/","name":"Web3"}},{"@type":"ListItem","position":3,"item":{"@id":"/web3/how-to/","name":"How to"}},{"@type":"ListItem","position":4,"item":{"@id":"/web3/how-to/restrict-gateway-access/","name":"Restrict gateway access"}}]}
```

---

---
title: Use Ethereum gateway
description: Once you have an Ethereum gateway — meaning that you create a new gateway with a target of Ethereum — you can interact with different Ethereum networks by specifying the correct JSON blob for your query.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/web3/how-to/use-ethereum-gateway.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Use Ethereum gateway

Once you have an Ethereum gateway — meaning that you [create a new gateway](https://developers.cloudflare.com/web3/how-to/manage-gateways/#create-a-gateway) with a `target` of **Ethereum** — you can interact with [different Ethereum networks](https://developers.cloudflare.com/web3/ethereum-gateway/reference/supported-networks/) by specifying the correct JSON blob for your query.

## Read from the network

The Cloudflare Ethereum Gateway allows HTTP requests where the body of the request is set to be the JSON body of the request you would like to make. For example, if you would like to read the block that is at number `0x2244`, then your JSON blob takes the form:

```

{

  "jsonrpc": "2.0",

  "method": "eth_getBlockByNumber",

  "params": ["0x2244", true],

  "id": 1

}


```

Each blob use a valid [method parameter](https://developers.cloudflare.com/web3/ethereum-gateway/reference/supported-api-methods/). The `params` array here contains the block number that we would like to locate and a boolean expressing whether each individual transaction in the block should be shown in their entirety (`true`) or as stubs (`false`).

To send this query to your [custom Ethereum Gateway](https://developers.cloudflare.com/web3/how-to/manage-gateways/), you could use a cURL command:

Terminal window

```

curl https://web3-trial.cloudflare-eth.com/v1/mainnet -H 'Content-Type: application/json' --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x2244", true],"id":1}'


```

You can also write the same query using the JS Fetch API:

JavaScript

```

await fetch(

  new Request("https://web3-trial.cloudflare-eth.com/v1/mainnet", {

    method: "POST",

    body: JSON.stringify({

      jsonrpc: "2.0",

      method: "eth_getBlockByNumber",

      params: ["0x2244", true],

      id: 1,

    }),

    headers: {

      "Content-Type": "application/json",

    },

  }),

).then((resp) => {

  return resp.json();

});


```

The response in both cases will be a JSON blob of the form:

```

{

  "jsonrpc": "2.0",

  "id": 1,

  "result": {

    "difficulty": "0x746ef15b66",

    "extraData": "0x476574682f76312e302e302f6c696e75782f676f312e342e32",

    "gasLimit": "0x1388",

    "gasUsed": "0x0",

    "hash": "0xd6bb42034740c5d728e774e43a01f26222e0fcc279c504ca5963dc34fe70f392",

    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",

    "miner": "0xf927a40c8b7f6e07c5af7fa2155b4864a4112b13",

    "mixHash": "0x975da446e302e6da6cedb3fbaa763c3c203ae88d6fab4924e2a3d34a568c4361",

    "nonce": "0x88a7f12f49151c83",

    "number": "0x2244",

    "parentHash": "0x067fd84ecdbc7491bf5ec7d5d4ead361b1f590eec74797a7f90b4a7d7004a48d",

    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",

    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",

    "size": "0x21b",

    "stateRoot": "0x828dade2067283e370993ec6a1bda0e65c1310e404a6d5bbb030b596eb80017c",

    "timestamp": "0x55bb040f",

    "totalDifficulty": "0x5c328da43525d",

    "transactions": [],

    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",

    "uncles": []

  }

}


```

## Write to the network

Currently, the Ethereum Gateway allows you to write to the network using the `eth_sendRawTransaction` RPC method. This creates a new message call transaction or a contract creation for signed transactions. The transactions are signed using a secret key corresponding to your own [Ethereum wallet ↗](https://www.ethereum.org/use/#%5F3-what-is-a-wallet-and-which-one-should-i-use).

Once you have a wallet set up and a method of signing your own transactions, you can write that transaction to the Ethereum network via the [Cloudflare Ethereum Gateway](https://developers.cloudflare.com/web3/ethereum-gateway/reference/supported-api-methods/). Signed transactions use hexadecimal strings of the form:

```

"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"


```

Then you can use your [custom Gateway](https://developers.cloudflare.com/web3/how-to/manage-gateways/) to send the transaction to the network with a cURL command:

Terminal window

```

curl https://web3-trial.cloudflare-eth.com/v1/mainnet -H 'Content-Type: application/json' --data '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"],"id":1}'


```

You could also use a JS Fetch API request:

JavaScript

```

await fetch(

  new Request("https://web3-trial.cloudflare-eth.com/v1/mainnet", {

    method: "POST",

    body: JSON.stringify({

      jsonrpc: "2.0",

      method: "eth_sendRawTransaction",

      params: [

        "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",

      ],

      id: 1,

    }),

    headers: {

      "Content-Type": "application/json",

    },

  }),

).then((resp) => {

  return resp.json();

});


```

_(The actual command above will not work — you need to provide your own signed transaction.)_

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/web3/","name":"Web3"}},{"@type":"ListItem","position":3,"item":{"@id":"/web3/how-to/","name":"How to"}},{"@type":"ListItem","position":4,"item":{"@id":"/web3/how-to/use-ethereum-gateway/","name":"Use Ethereum gateway"}}]}
```

---

---
title: Use IPFS gateway
description: Once you have an IPFS gateway — meaning that you create a new gateway with a target of IPFS — you can get data from the IPFS network by using a URL.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/web3/how-to/use-ipfs-gateway.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Use IPFS gateway

Once you have an IPFS gateway — meaning that you [create a new gateway](https://developers.cloudflare.com/web3/how-to/manage-gateways/#create-a-gateway) with a `target` of **IPFS** — you can get data from the IPFS network by using a URL.

## Read from the network

Every time you access a piece of content through Cloudflare's IPFS Gateway, you need a URL with two parts: the gateway hostname and the request path.

### Gateway hostname

Your gateway hostname will be the **Hostname** value you supplied when you [created the gateway](https://developers.cloudflare.com/web3/how-to/manage-gateways/#create-a-gateway).

### Request path

The request path will vary based on the type of content you are serving.

If a request path is `/ipfs/<CID_HASH>`, that tells the gateway that you want the content with the Content Identifier (CID) that immediately follows. Because the content is addressed by CID, the gateway's response is immutable and will never change. An example would be `https://cloudflare-ipfs.com/ipfs/QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco/wiki/`, which is a mirror of Wikipedia and an immutable `/ipfs/` link.

If a request path is `/ipns/<DOMAIN>`, that tells the gateway that you want it to lookup the CID associated with a given domain in DNS and then serve whatever content corresponds to the CID it happens to find. Because DNS can change over time, so will the gateway's response. An example would be `https://cloudflare-ipfs.com/ipns/ipfs.tech/`, which is IPFS's marketing site and can be changed at any time by modifying the [DNSLink record](https://developers.cloudflare.com/web3/ipfs-gateway/concepts/dnslink/) associated with the `ipfs.tech` domain.

## Write to the network

Cloudflare's IPFS Gateway is currently limited to read-only access.

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/web3/","name":"Web3"}},{"@type":"ListItem","position":3,"item":{"@id":"/web3/how-to/","name":"How to"}},{"@type":"ListItem","position":4,"item":{"@id":"/web3/how-to/use-ipfs-gateway/","name":"Use IPFS gateway"}}]}
```

---

---
title: Gateway DNS records
description: Once you create a gateway, Cloudflare automatically creates and adds records to your Cloudflare DNS so your gateway can receive and route traffic appropriately:
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/web3/reference/gateway-dns-records.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Gateway DNS records

Once you [create a gateway](https://developers.cloudflare.com/web3/how-to/manage-gateways/#create-a-gateway), Cloudflare automatically creates and adds records to your Cloudflare DNS so your gateway can receive and route traffic appropriately:

* **Ethereum gateways**: Creates a [proxied](https://developers.cloudflare.com/dns/proxy-status/) `CNAME` record pointing your hostname to `ethereum.cloudflare.com`.
* **IPFS gateways**: Creates a [proxied](https://developers.cloudflare.com/dns/proxy-status/) `CNAME` record pointing your hostname to `ipfs.cloudflare.com` and a `TXT` record with the value specified for its [DNSLink](https://developers.cloudflare.com/web3/ipfs-gateway/concepts/dnslink/#how-is-it-used-with-cloudflare).

These records cannot be edited within Cloudflare DNS. To make edits, you will have to [edit the gateway configuration](https://developers.cloudflare.com/web3/how-to/manage-gateways/#edit-a-gateway) itself.

## Existing DNS records

When you [create a gateway](https://developers.cloudflare.com/web3/how-to/manage-gateways/#create-a-gateway) using a hostname with pre-existing DNS records, Cloudflare automatically overwrites your existing records to make them apply to your Web3 gateway.

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/web3/","name":"Web3"}},{"@type":"ListItem","position":3,"item":{"@id":"/web3/reference/","name":"Reference"}},{"@type":"ListItem","position":4,"item":{"@id":"/web3/reference/gateway-dns-records/","name":"Gateway DNS records"}}]}
```

---

---
title: Gateway status
description: Once you create a gateway, it can have one of several statuses.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/web3/reference/gateway-status.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Gateway status

Once you [create a gateway](https://developers.cloudflare.com/web3/how-to/manage-gateways/#create-a-gateway), it can have one of several statuses.

| Status       | Definition                                                                                                                                                                                  |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Active**   | The DNS records for your gateway have been created and are functioning correctly.                                                                                                           |
| **Pending**  | Your Web3 gateway is in the process of becoming **Active**.                                                                                                                                 |
| **Deleting** | Your Web3 gateway is being deleted.                                                                                                                                                         |
| **Error**    | The DNS records for your gateway are misconfigured or do not exist. To fix, try [refreshing the gateway](https://developers.cloudflare.com/web3/how-to/manage-gateways/#refresh-a-gateway). |

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/web3/","name":"Web3"}},{"@type":"ListItem","position":3,"item":{"@id":"/web3/reference/","name":"Reference"}},{"@type":"ListItem","position":4,"item":{"@id":"/web3/reference/gateway-status/","name":"Gateway status"}}]}
```

---

---
title: Limits
description: The following limits apply to users of the Cloudflare Web3 Gateways.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/web3/reference/limits.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Limits

The following limits apply to users of the Cloudflare Web3 Gateways.

Note

For more pricing details, refer to the [Web3 product page ↗](https://www.cloudflare.com/application-services/products/web3/).

## IPFS Gateway

The following limits apply to Cloudflare's [IPFS Gateway](https://developers.cloudflare.com/web3/ipfs-gateway/).

| Free                                         | Pro                                                                              | Business                                                                         | Enterprise                                                                       |                                                                                                                                                                                       |
| -------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Availability                                 | Yes (Usage-based billing)                                                        | Yes (Usage-based billing)                                                        | Yes (Usage-based billing)                                                        | Yes (Usage-based billing)                                                                                                                                                             |
| Total gateways                               | 15                                                                               | 15                                                                               | 15                                                                               | Unlimited                                                                                                                                                                             |
| Gateway types                                | [DNSLink](https://developers.cloudflare.com/web3/ipfs-gateway/concepts/dnslink/) | [DNSLink](https://developers.cloudflare.com/web3/ipfs-gateway/concepts/dnslink/) | [DNSLink](https://developers.cloudflare.com/web3/ipfs-gateway/concepts/dnslink/) | [DNSLink](https://developers.cloudflare.com/web3/ipfs-gateway/concepts/dnslink/),[Universal Gateway](https://developers.cloudflare.com/web3/ipfs-gateway/concepts/universal-gateway/) |
| Included bandwidth (without additional cost) | 50 GB data transfer                                                              | 50 GB data transfer                                                              | 50 GB data transfer                                                              | 100 GB data transfer                                                                                                                                                                  |
| File size limit                              | None                                                                             | None                                                                             | None                                                                             | None                                                                                                                                                                                  |

## Ethereum Gateway

The following limits apply to Cloudflare's [Ethereum Gateway](https://developers.cloudflare.com/web3/ethereum-gateway/).

| Free                                          | Pro                       | Business                  | Enterprise                |                           |
| --------------------------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- |
| Availability                                  | Yes (Usage-based billing) | Yes (Usage-based billing) | Yes (Usage-based billing) | Yes (Usage-based billing) |
| Total gateways                                | 15                        | 15                        | 15                        | Unlimited                 |
| Included bandwidth  (without additional cost) | 500,000 HTTP requests     | 500,000 HTTP requests     | 500,000 HTTP requests     | 1,000,000 HTTP requests   |

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/web3/","name":"Web3"}},{"@type":"ListItem","position":3,"item":{"@id":"/web3/reference/","name":"Reference"}},{"@type":"ListItem","position":4,"item":{"@id":"/web3/reference/limits/","name":"Limits"}}]}
```

---

---
title: Legacy gateway migration
description: As announced in our blog post, Cloudflare is deprecating legacy hostnames that point to our public gateway endpoints at cloudflare-eth.com and cloudflare-ipfs.com.
image: https://developers.cloudflare.com/core-services-preview.png
---

[Skip to content](#%5Ftop) 

Was this helpful?

YesNo

[ Edit page ](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/web3/reference/migration-guide.mdx) [ Report issue ](https://github.com/cloudflare/cloudflare-docs/issues/new/choose) 

Copy page

# Legacy gateway migration

As announced in [our blog post ↗](https://blog.cloudflare.com/ea-web3-gateways/), Cloudflare is deprecating legacy hostnames that point to our public gateway endpoints at `cloudflare-eth.com` and `cloudflare-ipfs.com`.

If you created a hostname pointing to these gateways during the [private beta ↗](https://blog.cloudflare.com/announcing-web3-gateways/), you should migrate to use our new Web3 gateways to avoid a disruption in service.

---

## Migration guide

The migration is a simple process.

First, create a [Cloudflare account](https://developers.cloudflare.com/fundamentals/account/create-account/).

Then create a new [Web3 custom gateway](https://developers.cloudflare.com/web3/how-to/manage-gateways/#create-a-gateway) with your existing hostname.

Alternatively, you could also create a [Web3 custom gateway](https://developers.cloudflare.com/web3/how-to/manage-gateways/#create-a-gateway) for a new hostname and then modify your application to use your newly created hostname ([IPFS](https://developers.cloudflare.com/web3/how-to/use-ipfs-gateway/) or [Ethereum](https://developers.cloudflare.com/web3/how-to/use-ethereum-gateway/)).

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/web3/","name":"Web3"}},{"@type":"ListItem","position":3,"item":{"@id":"/web3/reference/","name":"Reference"}},{"@type":"ListItem","position":4,"item":{"@id":"/web3/reference/migration-guide/","name":"Legacy gateway migration"}}]}
```
