Open dentarthur opened 5 years ago
For example, you currently have:
https://davidmc1948.github.io/TCMP/
which is built by jekyll from your repository at:
https://github.com/DavidMc1948/TCMP
on branch "gh-pages".
If you wanted apex.com and www.apex.com to point to that site I think you first just go to settings at your /TCMP repository and add the custom domain "www.apex.com".
This is the third example at:
https://help.github.com/articles/custom-domain-redirects-for-github-pages-sites/
ie for "Project Pages site owned by a user account"
(with "TCMP" instead of "projectname" and "www" instead of "project").
If it allows you to add more than one then also add "apex.com" (but I assume it doesn't)
Don't enable https enforcement until later as there are or may be complications.
Then you do the rest at your DNS provider, not at Github.
But I am NOT sure. Suggest trying it out and checking what happens with "dig".
I am assuming that in addition anybody looking at your current URL:
https://davidmc1948.github.io/TCMP/ will be sent to www.apex.com/TCMP to see the same pages but with your new domain name in the address bar.
I think you might also need to fix your repository at:
https://github.com/DavidMc1948/davidmc1948.github.io
as that will be visible at:
www.apex.com/ and at apex.com/
while your actual site pages are only at www.apex.com/TCMP and apex.com/TCMP
Perhaps your front page needs to be in your davidmc1948.github.io repository with links pointing to the /TCMP and any other repositories you want to make visible
But I find the redirection bit puzzling. Anyway, Cloudfare can do its own redirection if needed.
Best to just try it and see, remembering that Github is providing the webserver and your DNS can only point to whatever GitHub is showing at davidmc1948.github.io
Github guide for troubleshooting problems: https://help.github.com/articles/troubleshooting-custom-domains/
First read general background on what DNS is about:
https://www.cloudflare.com/en-au/learning/dns/what-is-dns/
Note that DNS does not redirect folders like /TCMP to seem to be at /. That can only be done by a web server not a DNS server.
HowTo for dig here: (via wikipedia)
https://www.madboa.com/geek/dig/#grabbing-soa-information
Make sure your DNS records have a very short TTL (time to live) initially eg 60 so that you only need to wait 1 minute while making changes.
https://en.wikipedia.org/wiki/Time_to_live#DNS_records
Then set them to the more usual 24 hours ie 86400 after you have finished experimenting.
(Likewise when making changes later, first set the TTL to low value a day before you actually want to make the changes).
If they provide CNAME flattening (eg Cloudfare below) then you use a CNAME for apex.com as well as for www.apex.com and both CNAME records point to:
davidmc1948.github.io
Otherwise you can only use CNAME for www.apex.com.
For a DNS provider that does not offer CNAME flattening but offers (non-standard) ALIAS records, use that for apex.com eg
https://simpledns.com/kb/2/alias-records-auto-resolved-alias
Cloudfare offers free DNS and wholesale domain registration prices and can also be used as secondary to another as primary so seems a safe bet. I think they also provide free shared https certificates though other ways may be better.
https://developers.cloudflare.com/registrar/ https://www.cloudflare.com/dns/
Does not directly support dynamic DNS (DDNS) but there are ways to do it.
Cloud DNS does offer free DDNS. https://www.cloudns.net/dynamic-dns/
I haven't checked them out. But cannot see any harm in registering your domain at Cloudfare now and initially just using their DNS. If they are lying about wholesale domain name prices you should notice when they quote the price at checkout for credit card payment and cancel if it is not as low as any others offered by cheap registrars you google.
Can play with DDNS later.
BTW if you want to be able to "stage" your pages before "publishing" it might be better to not use the branch "gh-pages" but instead use /docs within branch "master":
https://help.github.com/articles/configuring-a-publishing-source-for-github-pages/
That way you can fork a branch to edit changes and then merge it to master when finished editing.
I guess you can do that with gh-pages to but it may be more natural "Github flow" using master. Also you can keep other related stuff for the web site outside the /docs but in same repository for convenience.
It looks like they are not open for business yet and you can only transfer domain names that are already registered somewhere else. https://www.cloudflare.com/products/registrar/
Whoops. Seems odd.
There are cheaper but if you are in a hurry Amazon Route 53 is something we might eventually want.
https://aws.amazon.com/getting-started/tutorials/get-a-domain/
has signup for free account with useful free services.
But better to start that when we actually want to try some as most expire in 12 months
https://aws.amazon.com/free/terms/?ft=nt
Costs USD $12 pa registration for .com instead of Cloudfare wholesale $8.03 https://d32ze2gidvkk54.cloudfront.net/Amazon_Route_53_Domain_Registration_Pricing_20140731.pdf
Plus $0.50 per month = $6 per year for DNS service instead of $0. Could move later.
https://aws.amazon.com/route53/pricing/#Hosted_Zones
If you can register without triggering 12 months trial till later, do.
Else google for cheap registrar with enough DNS service for your Github site.
NB Please start two files to record everything you setup so it can be easily retrieved for your future changes or handed over when necessary with all info an administrator needs in one spot.
links to github repository contents of CNAME file saved final output from dig >> name.dig.txt verifying
URLs for login to registrar and DNS provider
Whois output from domain registrar.
eg Soon similar for incorporation registration, institute site, Google G-Suite etc It mounts up so start now with your own sites.
I mentioned CloudDNS above. Looks good.
https://www.dynadot.com/domain/icu.html $1.50 register plus $7 per year or to transfer or via
https://www.cloudns.net/domain-pricing-list/ $3/10/10 cf .com $12/12/12 pick green tick for privacy guard
Free DNS https://www.cloudns.net/index/show/signup/
including free DDNS https://www.cloudns.net/dynamic-dns/
has ALIAS records (use for github CNAME with apex.com)
https://www.cloudns.net/features/
also mail forwarding
https://www.cloudns.net/wiki/article/26/
also web redirection
https://www.cloudns.net/wiki/article/16/
Looks perfect which is suspicious.
Anyway, I suggest CloudDNS with .com or .icu
.icu bad for email as cheap so used by spammers so gets blacklisted.
https://www.spamhaus.org/statistics/tlds/
.com safe and can easily transfer registrars
Dont waste the 12 months Amazon free trials till needed.
It would probably be better to have simplymarxism.com pointing to a particular repository rather than davidmc1948.githubio. That way I can wear various hats if I want.
The instructions and discussion online are as clear as mud but my understanding is that I
Set up a repository called simplymarxism and create an index.html file there with some stuff in it. Put it in a gh-page. Make sure the web page works.
Signup at https://www.cloudns.net/
Buy domain name, simplymarxism.com.
Go to Github simplymarxism repository settings and enter domain name.
Back to DNS provider and configure an ALIAS for simplymarxism.com pointing to davidmc1948.githubio/simplymarxism and a DNAME for www.simplymarxism.com. [BTW, cloudns.net does let you change TTL with free account. I don't know what it is set at.]
Go shopping for an hour or so.
Sounds right. Try it. DNAME --> CNAME Use dig and save output.
On Mon, 14 Jan 2019 17:42 DavidMc1948 <notifications@github.com wrote:
It would probably be better to have simplymarxism.com pointing to a particular repository rather than davidmc1948.githubio. That way I can wear various hats if I want.
The instructions and discussion online are as clear as mud but my understanding is that I
1.
Set up a repository called simplymarxism and create an index.html file there with some stuff in it. Put it in a gh-page. Make sure the web page works. 2.
Signup at https://www.cloudns.net/ 3.
Buy domain name, simplymarxism.com. 4.
Go to Github simplymarxism repository settings and enter domain name. 5.
Back to DNS provider and configure an ALIAS for simplymarxism.com pointing to davidmc1948.githubio/simplymarxism and a DNAME for www.simplymarxism.com. [BTW, cloudns.net does let you change TTL with free account. I don't know what it is set at.] 6.
Go shopping for an hour or so.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Maksakovsky-admin/technical/issues/15#issuecomment-453913145, or mute the thread https://github.com/notifications/unsubscribe-auth/AGr2C-dc7rAAnMOsWV3jf28M9RLSBf2Iks5vDCbugaJpZM4ZwT-8 .
All good so far.
simplymarxism.com takes me to the simplymarxism repository www.simplymarxism.com diverts to simplymarxism.com
My old bookmark also takes me to simplymarxism.com https://davidmc1948.github.io/simplymarxism/
Before the URL there is a little "not secure" message in Chrome and something similar in Edge.
Great!
"Not secure" just means some viewers might take browser advice to go elsewhere and all viewers SHOULD refuse to provide private info. Unimportant. Fix later by adding certificate for https.
Better if Github CNAME is www so diversion is to www so users tell each other www because they see www. Try change now. Should work immediately. No change at DNS.
On Tue, 15 Jan 2019 14:47 DavidMc1948 <notifications@github.com wrote:
All good so far.
simplymarxism.com takes me to the simplymarxism repository www.simplymarxism.com diverts to simplymarxism.com
My old bookmark also takes me to simplymarxism.com https://davidmc1948.github.io/simplymarxism/
Before the URL there is a little "not secure" message in Chrome and something similar in Edge.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Maksakovsky-admin/technical/issues/15#issuecomment-454257827, or mute the thread https://github.com/notifications/unsubscribe-auth/AGr2C7rQ_n2D000086ufqT9H8t_JVojlks5vDU9ngaJpZM4ZwT-8 .
CNAME set to www.
Stuff on custom domains and https at Github:
(https://blog.github.com/2018-05-01-github-pages-custom-domains-https/)
The procedures you want are in:
https://help.github.com/articles/user-organization-and-project-pages/ More about above at end of this.
https://help.github.com/articles/setting-up-an-apex-domain-and-www-subdomain/
This links to two separate procedures for apex and www. Do both.
Also read: https://help.github.com/articles/about-supported-custom-domains/
That page mentions: "Note: Some DNS providers support configuring apex domains with an ALIAS or ANAME record, but there is no industry standard for these. Only DNS Made Easy currently supports ANAME records and DNSimple is one of the few DNS providers that support ALIAS records"
I will checkout those two DNS providers first to see if they also offer domain name registration and Dynamic DNS. If you get impatient look them up yourself. (I am pretty sure Amazon, Google and other cloud service providers do all provide what is needed).
Do follow this advice at above link:
"We strongly recommend that you use a www subdomain for these reasons:
It gives your GitHub Pages site the benefit of our Content Delivery Network. It is more stable because it is not affected by changes to the IP addresses of GitHub's servers. Pages will load significantly faster because Denial of Service attack protection can be implemented more efficiently."
This means that despite also providing apex domain you should only advertize links that start with www.
Both www.apex.com and apex.com will reach the same pages at github.io but you want your users to only click on links for www.apex.com and to tell each other only about www.apex.com.
1) Only those who do click with wwww. prefix will benefit from Content Delivery Network.
2) Gives you greater flexibility to move apex domain elsewhere (or vice versa).
These are the original purpose of www. prefix.Actual web server (now "Content Delivery Network") separate location from other services administered by same apex.com organization.
In following the procedures to verify your setup you will need a Windows version of "dig".
There may be easier ways to get dig, but first link I found was:
https://nil.uniza.sk/how-install-dig-dns-tool-windows-10/
This is a classic example of the endless hassles you will have doing this stuff from Windows.
With Linux, "dig" and every other tool that gets casually mentioned is "just there" without these installation hassles.
While I am checking out domain registrars with DNS service, please follow up on my advice #12 to install EURACE Virtual Appliance (ETACE) in your VirtualBox. This may take longer than just installing dig specially for Windows but once you have done it you will have dig and everything else needed without the Windows installation hassles.
Another option is to install Cygwin, which will provide some of the facilities Linux users take for granted within Windows (no doubt including dig):
https://cygwin.com/index.html
But that predates VirtualBox and is mainly useful for developers of Windows software who need to actually do things within Windows. I recommend running Linux under VirtualBox instead. Will recommend a specific distro soon, but meanwhile familiarize with VirtualBox (and get dig) by installing EURACE.
IMPORTANT
https://help.github.com/articles/user-organization-and-project-pages/
I am surprised you mentioned that you were pointing your domain name to userame.github.io.
Read above carefully. I suspect you may want to point to individual repositories for different subdomains or may need to create a top level page that redirects to others?