Getting SSL_ERROR_BAD_CERT_DOMAIN with custom domain

I have the domain niklasandersson.io connected to my site niklasandersson.netlify.app and when trying to reach the site through the custom domain (which is setup with netlify DNS) I get this:
"Warning: Potential Security Risk Ahead

Websites prove their identity via certificates. Firefox does not trust this site because it uses a certificate that is not valid for niklasandersson.io. The certificate is only valid for the following names: *.netlify.app, netlify.app

Error code: SSL_ERROR_BAD_CERT_DOMAIN"

How do I resolve this? The site is fully accessible through the netlify.app-URL

Hi @N-Andersson,

Thanks for reaching out and welcome to Netlify’s Support Forums!

Looks like the dns hasn’t fully propagated:

dig niklasandersson.io NS +trace | tail -n 6
niklasandersson.io.	3600	IN	NS	dns1.p04.nsone.net.
niklasandersson.io.	3600	IN	NS	dns4.p04.nsone.net.
niklasandersson.io.	3600	IN	NS	dns3.p04.nsone.net.
niklasandersson.io.	3600	IN	NS	dns2.p04.nsone.net.
;; Received 136 bytes from 198.51.45.9#53(dns2.p09.nsone.net) in 36 ms

The last line, Received 136 bytes, shows the name server that answered the above query which is dns2.p09.nsone.net and not a Netlify name server mentioned here.

You can read about propagation here:

Hi @Melvin and thanks for your answer!

I think I understand the propagation issue but I’m still quite unsure what I should do. Is the solution just to wait it out until the DNS is fully propagated?

Hi @N-Andersson,

Looks like the dns has propagated, when visiting niklasandersson.io the site properly resolves and the SSL certificate has been created.