Adding a domain to our droplet

Using an IP for a website is not nice; we always need to use a domain to help users find our website easier. If you want to use a domain on your droplet, you need to change the nameservers of your domain to point to Digital Ocean DNS. I normally use GoDaddy to register my domains. To do so using GoDaddy, follow these steps:

  1.  Go to https://dcc.godaddy.com/manage/YOURDOMAIN.COM/dns, and then go to the Nameservers section:

  1. Click on the Change button, select Custom, and then specify the Digital Ocean DNS:

  1. Normally, this takes between 15 and 30 minutes for the DNS changes to be reflected; for now, after you have updated your Nameservers, go to your droplet dashboard, and then choose the Add a domain option:

  1. Then, write your domain name, select your droplet, and click on the Add Domain button:

Now, you have to create a new record for CNAME. Select the CNAME tab, in the HOSTNAME write www, in the alias field write @, and by default, the TTL is 43200; this is to enable access to your domain using the www prefix:

If you did everything correctly, you should be able to access your domain and see the React application working. As I said before, this process can take up to 30 minutes, but in some cases, it can take up to 24 hours, depending on the DNS propagation speed:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.244.216