Custom domain A record

Hi, I want to add custom domain to my netlify website. Currently on this domain there is hosted wordpress website by my local hosting services provider. In order to connect my netlify website to this custom domain I was advised to change only A record in their system (I have email accont there and cannot loose it, so they said that this is the only option). Could you advise me if my understanding is correct. In order to preceed I have to add my custom domain to my account and then just change A record in my local provider platform for load balancer’s IP address 104.198.14.52? I would be very grateful for the help.

Hi Waldi,

did you give this a read through already?

If you search for “custom domain” in these forums you will find lots of posts dealing with this, but if you can’t make it work please post again with more information, such as what you already tried, what is currently happening, and what your netlify name is, thanks :slight_smile:

Yeah, thanks I read it and also got response from the support what to do ;).

Regards

sounds good, if you still have concerns, come back. :slight_smile:

Hi Waldi, I am struggling with the same issue, I can’t make out what to do from the docs.
Could you share what support suggested?

1 Like

Hi, @pim. I believe our public docs layout changed so the link above probably isn’t the best one anymore. The best instructions for this are currently here:

https://docs.netlify.com/domains-https/custom-domains/configure-external-dns/

This answer assumes you are not using Netlify DNS for your domain. (If you are using it, please let us know.)

Pointing a custom domain to a Netlify site is done using domain name system (DNS) records. So, wherever your DNS is configured for you domain, one (or possible more) DNS records need to be added there.

Let’s say your custom domain is example.com. If so, example.com is the “apex” or “root” domain.

For any subdomains of this apex domain (www.example.com is an example of a subdomain), the instructions say to make a CNAME record which point to your Netlify site’s subdomain (like my-site.netlify.com).

Here is an example of the CNAME record which might be used:

www.example.com.		600	IN	CNAME	my-site.netlify.com.

The trick is the apex/root domain itself. Officially, DNS doesn’t allow for using a CNAME record type for the apex/root domain.

Now, even though the DNS specification doesn’t allow it, many DNS service have a way to do this anyway. These are special record types and what they are called varies from one DNS service to another. Sometimes they are called ALIAS or ANAME records. Sometimes they are still called CNAME records but you can put them on the apex/root domain anyway.

If your DNS service allows this, then also create the CNAME/ANAME/ALIAS record (whatever it is called there) for the apex/root domain.

Again, though, not all DNS services to allow this non-standard record type on the apex/root domain.

If this is the case with your DNS service, then create an A type DNS record instead using the IP address of 104.198.14.52.

Finally, please also add any custom domains to the site settings in Netlify under Site Name > Settings > Domain management > Custom domains.

If this doesn’t work or there are other questions about this, please let us know.

Hi Luke,

It’s exactly the issue I’m having… the root domain is working fine (Stadtharmonie.ch) but not the subdomain www.stadtharmonie.ch.

I am quite confused now on how to handle this, on the one hand I read in your documentation: “If you assign an apex domain or a www subdomain to your site, Netlify will automatically add both the apex domain and the www subdomain.” On the other hand, under domain settings, it tells me to check DNS configuration and add the CNAME, which should be pointing to stadtharmonie.netlify.com. I tried doing exactly this, but then got error messages saying the website wasn’t secure when I tried going to www.stadtharmonie.ch.

Thanks for any insights, as I am very confused at this point how to solve the issue. Otherwise: absolutely loving Netlify and Netlify CMS! Cheers,
Rosanne

Hi, @rvdw, and welcome to our Netlify community site.

There was an issue with that SSL certificate which has been resolved now (which was that it didn’t cover the www subdomain).

If you see any further issues with this site or the custom domains associated with it, please let us know.

A very belated but heartfelt thank you :slight_smile:

1 Like