Ngrok custom hostname add cname to subdomain

8,477

Solution 1

Some DNS providers allow you to make a CNAME record instead of a A record for a apex domain (http://xyzfoo.com). CloudFlare is one example that allows this. These DNS providers would let you point your http://xyzfoo.com to your http://randomstuffabcd.ngrok.com.

Solution 2

Because Ngrok uses the Host header sent by the browser to determine how to redirect your traffic you will need to "reserve" the domain you want to use in the Ngrok dashboard. Note that doing this requires a paid Ngrok plan.

After reserving your domain you will be given a CNAME record to point it to.

Share:
8,477

Related videos on Youtube

phillipsk
Author by

phillipsk

Updated on September 18, 2022

Comments

  • phillipsk
    phillipsk almost 2 years

    I have xyzfoo.com domain. I created a DNS CNAME record which points to ngrok.com I have my app running locally on http://127.0.0.1:5000/ but not running remotely on zyxfoo.com

    Does a subdomain need to be used with a custom hostname on ngrok? Creating a subdomain seems like a hassle through my current hosting provider, I have an extra domain laying around and I do not mind using the domain solely for testing with ngrok

    I have a dedicated IP address and a SSL certificate. On my parent domain, xyzfoo.com I have also created a sub domain foo.xyzfoo.com through which I have also created a CNAME record for, with hostname cname-for-ngrok and value of foo.xyzfoo.com

    I have two routes as I trying to get the custom hostname from ngrok to work, I am troubleshooting two ways,the foo.xyzfoo.com and xyzfoo.com are reserved domains on my ngrok dashboard. When I refresh my parent or subdomain I am not seeing my applicaiton, nor any activity on my terminal logs.

  • Artistan
    Artistan almost 6 years
    some also allow for a low TTL so it will update more frequently if you have to restart ngrok and have it update quickly.