Using nrgrok with CNAME on a DNS server

Viewed 413

I am using ngrok to be implemented in my automated testing. My plan is to create a tunnel for local front-end and back-end so I can have a container in the cloud running some E2E tests in local machine.

I create a functional tunnel from my backend to a concrete link.

Now this communication from my container is going through a DNS server with a CNAME changing the url that the application is trying to access to the ngrok one.

So the connection is

app-api.abc.net -> DNS(app-api.abc.net:1234.abc.com) -> backend

When connection is done through the DNS, I get a message:

Tunnel app-api.abc.net not found

1 Answers

If you want your own domain such as app-api.abc.net, you should pay pro plan.

  1. Created the domain with your custom domain.
  2. Run ngrok command with -hostname option.

For example,

ngrok http -region=us -hostname=app-api.abc.net 80
Related