By bossmania412
So I made a small but simple website with Node and Express on my droplet, and I can access the website using the IP of the droplet. I have also recently register for a domain with GoDaddy. I have also followed this guide to connect the domain with the droplet. However, when I enter in www.mydomain.com into the URL bar, it changes the domain to 123.456.78.910, which is the IP of my droplet. Is there any way to fix this?
EDIT: Ok, the URL now doesn’t change the domain to the IP. I have no idea how it fixed itself. I guess I just needed to give it time to fix itself.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
Once you’ve changed your nameservers and added an A record for your domain name to point to the Droplet’s IP address you could next setup an Nginx service as a reverse proxy for your Node.js app. You can follow the steps on how to do that here:
That way you will be to visit your domain name directly via your browser rather than having to type the port that the Node.js service is running on.
Let me know how it goes!
Best,
Bobby
Hi @bossmania412,
That’s weird, the issue was resolved by itself, nevertheless, can you share your configuration? Are you using Nginx as a reverse proxy, what is your configuration and stuff like that?
I’m eager to hear from you :)
Hello @bossmania412
The redirect might have been caused due to DNS propagation/cache or if you’re using PM2 a restart might have just done the trick for you.
I would also recommend to use Nginx as a reverse proxy to complete the setup.
Regards
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.