I currently have my wordpress hosted on GoDaddy’s server for our website. We’ve developed something and have it hosted on DO. We want to tie them together with a subdomain. I’ve followed the instructions on GD’s site and created the A file in the DNS pointing to the DO’s IP address (easy). There’s obviously something I need to do on the DO side but I do not have any idea where to start. This is my first time doing anything like this so I’m really going to need baby steps explained please.

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.

×
3 answers

What happens when you enter the new sub domain into your browser? How were you accessing your new site before this change?

Essentially, you want to add a “virtual host” to your web server config for this sub-domain - common web server software packages include Apache or nginx.

If it’s nginx on your droplet now, you could follow this tutorial:
How To Set Up Nginx Server Blocks (Virtual Hosts) on Ubuntu 16.04

If you’re not running Ubuntu 16 or nginx, there are numerous step-by-step tutorials on DigitalOcean’s Community site for all of the popular combinations.

Hope this helps get you started - please come back with more questions if you get stuck!

by Justin Ellingwood
When using the Nginx web server, server blocks (similar to the virtual hosts in Apache) can be used to encapsulate configuration details and host more than one domain off of a single server. In this guide, we'll discuss how to configure server blocks in Nginx on an Ubuntu...

Hi, @pinnacle

If you’re DNS zone is with GoDaddy (if you’re using GoDaddy’s nameservers) the only DNS change you need to make is the one you’ve already done. If you’re not using DigitalOcean’s nameservers you don’t need to make any DNS changes from your DO control panel.

If you’re already created the A record for the subdomain you can check if the DNS have propagated using tools like this one:

https://www.digitalocean.com/community/tools/dns

If everything is okay you should already been able to access the subdomain in your browser.

Hope that this helps!
Regards,
Alex

  • Hey Alex.
    I had set up an A record in the DNS in GoDaddy pointing to the IP address that is hosting on DO about 3 weeks ago and nothing has happened. I used the tool link you submitted and it shows my IP address for the GoDaddy domain. I’m at a loss though on what else is needed. I am, in no way, an IT guy so I’m attempting to try and figure this out as best I can. The company that set up the DO droplet for me told me that I had to have the main domain on the same server (move it from GD to GO) in order to set up the subdomain for it but I read a bunch of articles that all sounded like that was not necessary. It seems like something’s missing but I do not know what it could be.

    • Hi, @pinnacle

      Could you please double check what nameservers is your domain name using at the moment? You can again use the same tool I’ve already provided.

      If the domain name is using GoDaddy’s nameservers than you need to set the IP address of the DigitalOcean droplet as the A record in the GoDaddy DNS panel.

      If your domain name is using different nameservers than the DNS change needs to be done from elsewhere (e.g if you’re using DO nameservers you need to make the change from your DigitalOcean DNS panel.)

      Hope that this helps!
      Regards,
      Alex

You can create a subdomain record in your DNS zone file for a domain registered with GoDaddy. Subdomains are a type of domain prefix, such as blog.yoursite.com, that uses an A record to point to an IP address. To add a subdomain that points to a domain name, you’ll need to add a CNAME.

You can watch a short animation of this task farther down the page.

  1. Log in to your GoDaddy Domain Control Center. (Need help logging in? Find your username or password.)
  2. Select your domain name from the list to access the Domain Settings page.
  3. Under Additional Settings, select Manage DNS.
  4. Below the Records section, select Add.
  5. Select A from the Type drop-down menu.
  6. Complete the required fields:
    • Host: The host name, or prefix, for the subdomain. For example, enter blog to create a subdomain for blog.yoursite.com.
  7. Points to: The IP address you are setting as the destination for the host. This is usually the IP address of a hosting account where the site for your subdomain lives.
  8. TTL: How long the server should cache information. The TTL is set to 1 hour by default.

  9. Select Save to save your record.
    All DNS changes can take 24 - 48 hours to fully update across global networks.

Submit an Answer