TALL Tales

How to Add a Domain Name to a Digital Ocean Site

01 Mar, 2021

Here's a simple tutorial to add a domain name to your Digital Ocean app. If you are using Laravel Forge then this also applies because the domains are set up in Digital Ocean and not Forge.

Domain Registrar

Firstly go to your Domain Registrar and find your domain tools. You will need to go to the section for altering the Domain Nameservers. Add the Digital Oceans ones in there. These are currently:

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

Digital Ocean

Once you've saved that you can then go to your Digital Ocean control panel to set up the rest.

Log in and go to Networking->Domains.

Add your domain to the list. Then in the A section add:

  • Hostname: @
  • Server: choose the server you want the domain to point to

Then go to the CNAME records and add:

  • Hostname: your website address e.g. www.example.com
  • As an alias of: @

Save all that and then add your domain name to your app and away you go.