Home
Support Forums

Setting up A record or ALIAS

I’m trying to setup my custom domain for my github pages site soumyaray.github.io – the netlify domain is soumyaray.netfify.app. And my custom domain through Netlify is soumyaray.com

Even though the custom domain works, I’m being told by Github:
"Domain does not resolve to the GitHub Pages server (NotServedByPagesError). We recommend you add an A record pointed to our IP addresses, or an ALIAS record pointing to soumyaray.github.io.

How should I set up an A record or setup an ALIAS? Can the latter be done through my CNAME file?

Hi @soumyaray

If you are looking to host your site on Netlify then you are not hosting with GitHub Pages, thus your custom domain will point to Netlify and not GItHub. So you do not need a record pointing to GitHub Pages.

Thanks for pointing this out!

@coelmay I recently found that my hosted site was not updating, and had to have a line in my CNAME to get this working correctly:

soumyaray CNAME soumyaray.netlify.app.

Does that seem right or am I doing something redundant/useless?

Your site on Netlify wasn’t updating?

Is it linked correctly to GitHub?
Have you stopped builds? (Check under Site Settings > Build & Deploy)
Have you stopped auto publishing? (Check under Deploys, you should see Auto publishing in on towards the top of screen.)

Are you seeing successful deploys?

@coelmay Yes it wasn’t updating. I suspect the production branch got switched or something. My site doesn’t need building – the prebuilt site is pushed to master and Netlify picks it up from there. And as you correctly point out, I’m not pointing my custom domain to github, but rather to netlify. It all seems to be working now. I should probably just NOT tell Github that the site has a custom domain.

Might I clarify one last thing? My current CNAME file has two lines:

soumyaray
soumyaray CNAME soumyaray.netlify.app.

Do I need both lines? Is there anything wrong with this file as of now?

Certainly you may.

You’re domain is using Netlify DNS. Here is the Netlify DNS setup for one of my domains

You may need and A, CNAME, or ALIAS if you have a subdomain that you want to configure elsewhere (e.g. imgcdn.example.com if you have have a service with an image provider and you wish to use a custom domain.)