How to setup domain and sub-domain to different hosting providers


Current situation:

My domain: which is with ‘BigRock’, which has nameservers connection to the ‘HostGator’. Now, I want to point sub-domain to ‘DigitalOcean’.

Expected output: (BigRock) ----> HostGator (BigRock) ----> DigitalOcean

In order to achieve this, following are the steps I have taken but it still doesn’t seem to be working as expected. I already waited for 48 hours after making these changes.

  1. [In BigRock] Created the A record with the destination IP address of DigitalOcean droplet.
  2. [DigitalOcean] Assigned the domain (sub-domain actually) to the DigitalOcean droplet (it has the A record inside it too).
  3. [HostGator] Created (with Add a Domain option) a sub-domain inside HostGator (primary hosting connected via nameservers) which has A record that points to DigitalOcean.
  4. [DigitalOcean] Since is a wordpress website, I changed the URLs inside it in the database.

I think step 1 and 2 are necessary, I’m not sure about step 3.

Can someone help me here please? I might not have provided all the necessary details so please feel free to ask any follow-up question. Thank you.

Submit an answer

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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Site Moderator
Site Moderator badge
July 8, 2020
Accepted Answer

Hello, @suchakmaulik179

If your domain name is using Hostgator’s nameservers than all DNS changes need to be made from their control panel, because the active DNS zone is there. If you made DNS changes for your domain name from other control panel such as BigRock, the DNS changes will not take effect.

You can simply create an A record for and point it to the IP address of your droplet with DigitalOcean.

Hope that helps!

Regards, Alex

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel