How to setup domain and sub-domain to different hosting providers
example.com (BigRock) —-> HostGator
blog.example.com (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.
- [In BigRock] Created the A record with the destination IP address of DigitalOcean droplet.
- [DigitalOcean] Assigned the domain (sub-domain actually) to the DigitalOcean droplet (it has the A record inside it too).
- [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.
- [DigitalOcean] Since blog.example.com 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.
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.×