Logo
New RPC users get 35% off their first monthView the offer
Chainstack
Chainstack6 min read

Ethereum RPC URL for MetaMask: Using Chainstack Endpoints

A practical guide to obtaining a Chainstack Ethereum RPC URL and configuring it in MetaMask for mainnet and testnets, with security and troubleshooting tips.

TL;DR

This guide explains how to obtain a Chainstack Ethereum RPC URL and add it to MetaMask as a custom network. It covers mainnet and testnet endpoints, configuration steps, security considerations, and basic troubleshooting for a reliable MetaMask connection.

Why Use a Custom Ethereum RPC URL in MetaMask?

MetaMask comes with default RPC endpoints for Ethereum, but these public endpoints can be rate-limited or congested during peak usage. Using a dedicated RPC URL from a provider like Chainstack can improve reliability and performance for your wallet interactions.

A custom RPC URL also gives you control over which network you connect to, including testnets and sidechains, and can help avoid downtime associated with public infrastructure.

  • Avoid rate limits and congestion on public endpoints
  • Improve response times for transactions and balance checks
  • Connect to testnets or alternative networks easily
  • Gain more control over your wallet's network connection

How to Get a Chainstack Ethereum RPC URL

To use Chainstack with MetaMask, you need an RPC endpoint from a Chainstack project. Chainstack provides endpoints for Ethereum mainnet and testnets such as Sepolia and Goerli (availability may vary).

After signing up and creating a project, you can deploy an Ethereum node or use a shared node endpoint. The RPC URL will be displayed in the Chainstack console, typically in the format https://<network>.chainstack.com/<your-api-key>.

Keep your RPC URL private, as it may include an API key that grants access to your node.

  • Sign up for a Chainstack account
  • Create a project and deploy an Ethereum node (or use a shared endpoint)
  • Copy the HTTPS RPC URL from the console
  • Store the URL securely and avoid sharing it publicly
Example endpoint format (do not use this exact URL):
https://ethereum-mainnet.chainstack.com/your-api-key

Adding a Chainstack Ethereum RPC URL to MetaMask

Once you have your Chainstack RPC URL, you can add it to MetaMask as a custom network. The process is straightforward and works on both browser extension and mobile app.

You will need the network name, RPC URL, chain ID, and currency symbol. For Ethereum mainnet, the chain ID is 1 and the symbol is ETH. For testnets, use the appropriate chain ID (e.g., Sepolia: 11155111).

  • Open MetaMask and click the network selector
  • Select 'Add network' or 'Custom RPC'
  • Enter a network name (e.g., 'Ethereum via Chainstack')
  • Paste your Chainstack RPC URL
  • Enter chain ID (1 for mainnet) and currency symbol (ETH)
  • Save and switch to the new network
Network details for Ethereum mainnet:
Network Name: Ethereum (Chainstack)
RPC URL: https://ethereum-mainnet.chainstack.com/your-api-key
Chain ID: 1
Currency Symbol: ETH
Block Explorer URL: https://etherscan.io

Testnet Configuration Examples

If you need to connect to an Ethereum testnet, Chainstack may provide endpoints for networks like Sepolia. Always verify the current supported networks in the Chainstack console, as testnet availability can change.

Below are example parameters for Sepolia. Replace the RPC URL with your own Chainstack endpoint.

Example Sepolia configuration:
Network Name: Sepolia (Chainstack)
RPC URL: https://sepolia.chainstack.com/your-api-key
Chain ID: 11155111
Currency Symbol: SepoliaETH

Security and Best Practices

Your RPC URL may contain an API key that should be treated as a secret. Avoid committing it to public repositories or sharing it in screenshots.

Consider using environment variables or a secrets manager if you are integrating the RPC URL into applications. For MetaMask, the URL is stored locally in your wallet, but be cautious on shared devices.

Regularly review your provider's documentation for any changes to endpoints or authentication methods.

  • Keep your RPC URL private
  • Use HTTPS endpoints only
  • Monitor usage and rotate keys if compromised
  • Follow Chainstack's security recommendations

Troubleshooting Common Issues

If MetaMask shows a connection error, verify that the RPC URL is correct and that your Chainstack node is running. Check for typos in the URL or chain ID.

Network congestion or rate limits on your plan may cause slow responses. Review your Chainstack plan limits and consider upgrading if needed.

If you switch between networks frequently, ensure you select the correct network in MetaMask before sending transactions.

  • Double-check RPC URL and chain ID
  • Ensure your node is synced and accessible
  • Check for rate limiting or plan restrictions
  • Restart MetaMask or refresh the page

Never Worry about Infrastructure Again

OnFinality takes away the heavy lifting of DevOps so you can build smarter and faster.

Get Started