I need to connect geth rpc using in web3.js because my website is running in secure mode(https://example.com) I tried this and got error:

geth --rpc --rpcaddr ""

Fatal: Error starting protocol stack: listen tcp: address too many colons in address

How can I add https:// in start of my ip( using --rpcaddr?

The main issue is chrome browser can't allow web3.js to send ajax post request to when my site is opened with https://example.com(https)

1 Answer 1


Try to use --rpcaddr and --rpcport 443.

But as far as I know geth does not support SSL protocol. You can set up an Nginx reverse proxy to handle such case.

  • what is difference b/w 8545 and 443? Apr 18, 2018 at 15:49
  • These are different ports. 443 is usually used for SSL connection. 8545 for RPC interface connection. You can configure your web server to use SSL on 8545 port also if you need.
    – someart
    Apr 18, 2018 at 16:19
  • can you please provide some example for : ` Nginx reverse proxy to handle such case` Apr 18, 2018 at 17:15
  • Check the related topic
    – someart
    Apr 18, 2018 at 17:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.