I've read all about my theme but just can't get trough!

So, I have a website on GitHub and it is published as https://namesecondname.github.io/repositoryname/. and I bought a domain on HostGator. I've made a CNAME in my gh-pages and the next step was to add namservers in my HostGator domain management. There I need to write nameservers and now I'm stuck! WHAT ARE ACTUALLY NAMESERVERS AT GITHUB?

What should I write there? I tried adding name.github.io and I've tried adding this link https://namesecondname.github.io/repositoryname/ and tried without http. BUT nothing happens. When I go to the domain I get their webpage that says "You are almost there blablabla" and they remain me I have no idea what I'm doing.

1 Answer 1


You do not need to change the DNS. If you did that, the CNAME and A records would be pushed to be handled by Github, and that is not how it works.

Add a CNAME file to your repository in the GitHub account.

  1. Once you log into your GitHub account, click on your repository name:
  2. Then click on the + sign to add a new file to your repository:
  3. Use CNAME for File Name and enter a domain you've purchased in the first line of the editing section.
  4. Then click on the Commit new file button at the bottom of the page:
  5. Select Settings from the right sidebar:
  6. In the GitHub Pages section, you should see your domain from the CNAME file:

Back at Hostgator:

Here you will need to create three records for your domain:

  1. A record for @ pointing to
  2. A record for @ pointing to
  3. CNAME record for www pointing to your username.github.io (the username should be replaced with your actual GitHub account username):
  • 2
    I get A zone name must be a domain name, and can include a period at the end. this error on Name when I try to write @ in Name field Commented May 11, 2020 at 17:19
  • if @ doesn't work, try leaving the name field blank. @ represents the "domain apex" meaning "no sub-domain". @ is used in DNS zone files, but DNS web interfaces often expect you to leave the name blank for domain apex records. Commented Sep 28, 2021 at 7:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.