After setting up my own domain on Github Pages, I get an InvalidDNSError
Asked Answered
R

3

7

Phenomena

After setting up my own domain on Github Pages, I get an InvalidDNSError. The following message will appear

"Both www.example.work and its alternate name are improperly configured Domain's DNS record could not be retrieved. For more information, see Learn more (InvalidDNSError). We recommend you change this to a CNAME record pointing to username.github.io."

Expected value

I want to publish a website using github pages on my own domain.

Riverhead answered 26/2, 2022 at 9:6 Comment(0)
P
5

From your question, I assume that you are added www.example.work as custom domain in the github pages section and you might be missed the DNS settings part.

After adding custom domain in github pages, you need to setup a CNAME and 4 A record under the DNS settings of you custom domain.

enter image description here

you can find the detailed steps here in the official documentation of github.

Prissie answered 12/6, 2022 at 20:35 Comment(0)
P
1

I ran into this as well. After double checking the DNS with dig and continuing to get the same error, I removed the custom DNS on the GitHub Pages Settings form (using the "Remove" button) and then re-added it. That cleared the error for me.

Patric answered 15/2, 2023 at 16:17 Comment(0)
N
0

You need to change your domain DNS to CNAME and try again. enter image description here

as a Name you type www and in the target URL form, GitHub link.

Nahama answered 26/2, 2022 at 9:16 Comment(3)
I tried to set up DNS and CNAME as you suggested, but it didn't work.Riverhead
Leave it for an hour and check again, it's need some time to set up the DNS.If its the message same?Nahama
The same message will appear.Riverhead

© 2022 - 2024 — McMap. All rights reserved.