DEV Community

Reece Daniels
Reece Daniels

Posted on • Originally published at rubensbits.co on

GoDaddy, Surge, Apex Domains & CNAME Records


Problem

Summary

You need to get an apex domain (https://yoursite.com) you purchased at GoDaddy resolving correctly.

Explanation

The problem you face if your asked to do this is that - for basic domain purchases at least - GoDaddy doesn’t let you add CNAME records for apex domains .

An apex domain refers to https://yoursite.com rather than https://www.yoursite.com.

Solution

Explanation

  1. The advice from GoDaddy is that you must delete all A & CNAME records on GoDaddy first before adding any other CNAME or A records.
  2. You must replace the CNAME @ record with an A @ record using the IP of your host provider.

My host is surge.sh, who provide their IP in this documentation.

Thus, to have my domain recognised when deploying to surge I needed to delete all existing A & CNAME records, and to add the following two records following in the Type : Name : Value format:

CNAME: www : na-west1.surge.sh

A : @ : 45.55.110.124

Once complete, my domain resolved within 5 minutes.

If you’re struggling to locate your providers IP, try messaging them on Twitter or searching StackOverflow, but once you have it, it should do the trick.

Original source: GoDaddy Forums

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay