I am creating a github pages site by branching a gh-pages version off of my repository. Its url ends up being
myusername.github.io/myRepoName/
If I am hosting the project like this during development, will the IP address remain static?
The accepted answer has outdated IP addresses. Try the ones below.
185.199.108.153
185.199.109.153
185.199.110.153
185.199.111.153
I assume you're trying to set up a CNAME for this Github pages.
Click here for their documentations.
While the IP isn't static, these 2 IPs in unison should work:
192.30.252.153
192.30.252.154
Related
I have a domain registered at Route 53, but I want to have Netlify manage the DNS for this domain (the entire domain, unlike other questions about subdomains). I set the NS record for the domain to point to Netlify's name servers, but Netlify's custom domain configuration tool still claims that DNS is not configured correctly.
Below is a screenshot showing my current Route53 hosted zone configuration, with the NS records clearly pointed at Netlify's DNS servers. I waited for DNS propagation timeouts, flushed Google's DNS cache, and tried other suggestions and nothing worked.
The problem turned out to be that setting the NS records in the hosted zone doesn't actually let Netlify manage the DNS for the domain. Instead, you need to change the nameservers in the Registered Domains section of the Route 53 console. (NOT the Hosted Zones section.)
On that page, remove the AWS nameservers and add Netlify's nameservers. It will look like this when it's done: (Note that your nameserver hostnames may be different; copy them from Netlify's Custom Domain page)
Kudos to Netlify's support team for writing a doc that explains how to do this. It was admittedly hard to find this doc in Google because there are so many different Netlify docs about various DNS intricacies. But eventually Googling helped me find it.
In retrospect, it's now obvious to me that adding DNS records to a zone (even NS records!) can't change the nameservers used by the domain. But it would have been nice if the AWS console included this info when I edited the NS records so I didn't waste a few hours.
Leaving this answer here for the next victim. 😁
For domain registered at Route 53 and Netlify managing the DNS. It worked for me by changing the name servers both from the "Registered Domain" area and "Hosted Zone".
So I am trying to get a custom domain to work with my github pages user site. I have followed pretty much the standard procedure for doing this as follows: (recommended by github here too: https://help.github.com/articles/setting-up-an-apex-domain-and-www-subdomain/). Note I need both the apex domain (example.com) and the www subdomain (www.example.com) to resolve to my github pages user site at username.github.io (the website itself is a jekyll based blog and I have checked that it compiles successfully before I started this process)
I added an A record to my DNS records at the registrar pointing to all of the four IP addresses provided by Github from the apex domain example.com:
185.199.108.153
185.199.109.153
185.199.110.153
185.199.111.153
Next I went in and added a CNAME record for the www sub domain pointing to username.github.io
And then I finally enabled the custom domain example.com under the settings tab of the repository (under Github Pages > Custom Domain), and also enabled the Enforce HTTPS option after it was enabled within about an hour.
I have tried contacting my registrar and they said that everything in the DNS record seem fine and they get the following results:
A records :
example.com. 21460 IN A 185.199.111.153
example.com. 21460 IN A 185.199.109.153
example.com. 21460 IN A 185.199.110.153
example.com. 21460 IN A 185.199.108.153
CNAME :
www.example.com. 7199 IN CNAME username.github.io.
As expected.
But I still get the following error in github (under the settings tab of the repository):
"Domain does not resolve to the GitHub Pages server. For more information, see https://help.github.com/articles/setting-up-a-custom-domain-with-github-pages/."
And when I try to access the site by typing either example.com or www.example.com, the browser redirects to https://example.com/ and I get the error (on Chrome):
ERR_CONNECTION_REFUSED
Note that there is a warning on the documentation by github saying:
Warning: If your domain has HTTPS enforcement enabled, GitHub Pages' servers will not automatically route redirects. You must configure www subdomain and root domain redirects with your domain registrar.
I have no idea how to get around this. I suspect this is the possible cause of the issue. So a solution might be to circumvent this redirection, I just do not know how I would do this.
For anyone stumbling across this. Actually I realized I have outlined the correct method to set this up with Github Pages. And this is in line with what is recommended by Github as of today and works perfectly well. Just make sure you wait for the DNS Propagation to take effect which in some cases might take up to 24hrs. And this is what the problem was in my case.
Github shown me sucessive error message. After several iterations, github is happy with the following :
In Settings > Pages :set up your github page :
(you will have some error-warning message and Enforce HTTPS won't be ticked at first)
On my github repository's root, a CNAME file with the website name (with www):
www.example.com
On my domain registration's DNS :
www 28800 CNAME MYUSERNAME.github.io.
# 21460 A 185.199.111.153
# 21460 A 185.199.109.153
# 21460 A 185.199.110.153
# 21460 A 185.199.108.153
WAIT A DAY, ENJOY OUTDOOR WALK.
The website is ok and in my terminal, a dig command returns :
$dig WWW.example.com +nostats +nocomments +nocmd
;WWW.example.com. IN A
WWW.example.com. 26728 IN CNAME MYUSERNAME.github.io.
MYUSERNAME.github.io. 1527 IN A 185.199.108.153
MYUSERNAME.github.io. 1527 IN A 185.199.111.153
MYUSERNAME.github.io. 1527 IN A 185.199.110.153
MYUSERNAME.github.io. 1527 IN A 185.199.109.153
Tick the "Enforce HTTPS".
Note: Replace example.com and MYUSERNAME by the values relevant to you.
I already tried the three step process:
1) Created a CNAME file in my github repo with the domain name, mydomain.com;
2) Redirected the A Record to 192.30.252.153
and 192.30.252.154
3) CNAME Alias has host "www" pointing to "username.github.io"
But for some reason my mydomain.com is still just the default landing page for new domains and when I go to username.github.io, it just goes to mydomain.com with the same default landing page. Can someone please help? I am registered with domain.com
Additionally, there is a warning message on my Github settings stating,
Domain does not resolve to the GitHub Pages server. For more information, see https://help.github.com/articles/setting-up-a-custom-domain-with-github-pages/.
Any help is very much appreciated.
Im trying to have a custom domain for my github hosted blog, i changed the CNAME file to have my custom domain, head to my hostgator account, but i don't have access to the Cpanel, only a domain management dashboard where it only has a name server fields to edit, i suppose i need to change my DNS to the following:*
192.30.252.153
192.30.252.154
CNAME username.github.io
*
However there is no way i can do that on Hostgator name server only dashboard.
where does the CNAME username.github.io goes ?
Screen Shot to hostgator domain management dashboard
I contacted Hostgator and asked them to edit my DNS information from their side and they were helpful and add the IP address and CNAME for me.
Problem Solved
I am moving all my sites over to my git account for hosting. I don't have a whole lot of experience with git or route53 and can't seem to find many answers on this. I updated my registrar with the route53 nameservers and created a CNAME on my github. Do I put the git IP's under the SOA section on Route53 for this domain?
I'm sure this has been covered before but I didn't see any results when doing a search.
This was answered on the Route53 forum. Most of the time you can route a domain through your registrar but in this case I was using a .la extension which doesn't have this capability.
Here is your answer:
https://forums.aws.amazon.com/thread.jspa?messageID=526698򀥪