How to interpret an RPC endpoint URL structure
An nodes/rpc-endpoint-basics/">RPC endpoint URL is a web address your wallet or dApp sends requests to when it needs to read blockchain data or submit a transaction. You interpret it by splitting it into four parts: the protocol, the hostname, the port, and the path. Each part tells you something about who runs the node, what chain it serves, and how you connect to it.
The four parts of an RPC URL
Every RPC endpoint URL follows the same general pattern:
<protocol>://<hostname>:<port>/<path>
Protocol
Most RPC endpoints use either http:// or https://. The difference is encryption. HTTPS encrypts your requests; HTTP sends them in plain text. A public RPC provider should offer HTTPS. If you see HTTP, the connection is unencrypted, which means anyone on the network can read the requests and responses. Some local nodes use HTTP because the traffic never leaves your machine.
A small number of endpoints use wss:// or ws:// for WebSocket connections. These are used for real-time subscriptions (like pending transaction alerts) rather than one-off requests. The URL structure is otherwise the same.
Hostname
The hostname tells you who provides the node. There are three common patterns:
Provider domains - Services like Infura, Alchemy, QuickNode, or public endpoints hosted by projects. The hostname usually includes the provider name, for example eth-mainnet.g.alchemy.com or mainnet.infura.io. These are third-party nodes. You do not control them.
Chain-specific domains - Some blockchains host their own public endpoints. For example, a Cosmos chain might use https://rpc.cosmos.network. The hostname often includes the word "rpc" or the chain name.
Localhost or IP address - If you run your own node, the endpoint is typically http://localhost or http://127.0.0.1. Some setups use http://192.168.x.x if the node is on another machine on your local network.
Port
The port number is optional. If omitted, the browser or client uses the default: 80 for HTTP, 443 for HTTPS. Many RPC providers omit the port entirely and rely on the default.
When a port is specified, it is usually because the provider runs multiple services on the same machine. Common ports include:
8545- Default port for Geth and many Ethereum clients8546- WebSocket port for Geth1317- Common for Cosmos SDK REST endpoints26657- Common for Tendermint RPC (used by Cosmos chains)
If you see a non-standard port, the provider is running the RPC service on a port that differs from the default for that protocol.
Path
The path is the least standardised part. It can be empty, a single slash, or a long string of identifiers. Common patterns include:
- No path or just
/- The endpoint accepts requests at the root. /v3or/v2- API version number. Providers change these when they break backward compatibility.- A project ID or API key as a path segment - For example,
/v3/abc123def. Some providers put the API key in the path instead of a header or query parameter. - A chain identifier - For example,
/rpc/ethereumor/bsc/mainnet. This is common when one provider hosts endpoints for multiple chains on the same domain.
How to tell what chain an endpoint serves
The URL alone does not always tell you which blockchain the endpoint serves. A hostname like rpc.ankr.com could serve Ethereum, BNB Chain, Polygon, or dozens of others. The path might include the chain name, or it might not.
You can check the chain by sending a eth_chainId request (for EVM chains) or the equivalent method for non-EVM chains. Most wallets and dApps do this automatically when you add a network. If you are adding an endpoint manually and the chain ID does not match what you expect, the endpoint is either misconfigured or pointing to the wrong chain.
Why some URLs look different
Not every RPC endpoint follows the pattern above. A few variations exist:
IPFS or DNS-based endpoints - Some providers use subdomains that resolve to different servers based on your location. The URL looks normal, but the actual server you reach may change.
Tor or onion endpoints - If you see .onion in the hostname, the endpoint is accessible only through the Tor network. These are rare and used for privacy.
Local Unix sockets - Some node configurations use a file path instead of a network address. These look like ipc:///home/user/.ethereum/geth.ipc. They are faster than TCP but only work when the client and node are on the same machine.
What a broken URL looks like
Common mistakes in RPC endpoint URLs include:
- Missing protocol -
localhost:8545instead ofhttp://localhost:8545. The client may not know how to parse it. - Trailing slash where none is expected - Some providers reject requests if the URL ends with a slash when their server does not route that way.
- Wrong port - Using port 443 (HTTPS default) when the provider expects port 8545.
- Typo in hostname -
mainnet.infrua.ioinstead ofmainnet.infura.io. The domain may not exist or may be a phishing site.
If you are copying an endpoint from a provider dashboard or a site like Chainlist, check each part of the URL before pasting it into your wallet. A single character error can send your request to the wrong server or to no server at all.
Not financial advice. starname.me publishes market data and general information about digital assets. Crypto assets are volatile and you can lose everything you put in. Nothing here is a recommendation to buy, sell or hold, and we make no price predictions.
Prices are sourced from third parties and may be delayed or wrong. Verify anything you intend to act on against a primary source.