GF15
By:
GF15

Setup domain from different provider

December 29, 2015 935 views
DigitalOcean Nginx

Hello, I have developed a website working in development mode with my IP. It is running with Nginx.

This is for a client who has his domain name (example.com) registered in a different hosting provider. This provider agreed to redirect example.com to our IP. They told us that it was enough if we give them the IP to make the redirection.

That provider already made the redirection, but I am not sure if this is a simple redirect, because when I enter example.com in the browser, it redirects to the url IP. From my point of view, I expected example.com to persist in browser instead of changing.

I'm not very experienced setting up domains from other providers, that's why I have the following questions:

1) Do I have to setup something in DigitalOcean's panel?
2) Do I have to setup something in Nginx conf file different than server_name?
3) Is it possible that the provider with simply my IP redirect to my IP but persisting example.com in browser?

What I tried first was to setup nginx.conf file with server_name example.com, but the application crashed. For that I removed server name.

Thanks

1 Answer

Hey there,

Hm, so this really entirely depends on the other hosting provider your client is using. Do they allow you to modify DNS settings, or set your own nameservers? If so, I'd recommend having them point your nameservers to ours:

ns1.digitalocean.com
ns2.digitalocean.com
ns3.digitalocean.com

From there, you can check out this great Community Article on configuring DNS on our platform.

Now, with regards to your other questions, it sounds like your client's hosting provider set up a simple HTTP redirect to the IP, but it's also possible this could be a configuration issue in the application your client is trying to run on our service. Some, like WordPress or Magento (for instance) have an address preconfigured, which defaults to your IP. That'll cause links to redirect to your IP instead of your domain.

Your nginx configuration shouldn't matter unless you have a 301/302 redirect configured in there on purpose... which I wouldn't expect. server_name should be set to the domain, but if that's the only site you're running on that server, it does not matter too much.

Hopefully the above helps you out. Please let me know if you need anything else.

Best,
Eris
Platform Support Specialist

by Etel Sverdlov
This article walks you through setting up the DNS for your site. The tutorial includes steps to set up an A records, point your nameservers, and provides some information about MX records.
Have another answer? Share your knowledge.