Do I need to pay to change github pages domain? - github

I know that to make repository private, I need to change my plan to paid, but what if I want to change the default username.github.com to a custom domain?

No, it doesn't look like you would have to upgrade your GitHub account to use a domain name. From the docs at https://help.github.com/articles/quick-start-setting-up-a-custom-domain/ (the description doesn't mention anything about being a paid customer):
Pick a custom domain and register it with a DNS provider (if you
haven't already done so). A DNS provider is a company that allows
users to buy and register a unique domain name and connect that name
to an IP (Internet Protocol) address by pointing your domain name to
an IP address or a different domain name. A DNS provider may also be
called a domain registrar or DNS host.
Set up your custom domain with your DNS provider. Our guides outline
how to set up your pages custom domain with your DNS provider
depending on the type of custom domain you have.
However, these are the only domain types that are supported by GitHub (https://help.github.com/articles/about-supported-custom-domains/):
www subdomain (www.example.com)
one apex domain & one www subdomain (example.com & www.example.com)
apex domain (example.com)
custom subdomain (blog.example.com)
If you want your GitHub pages site to redirect to your domain (or someone else's) it doesn't look like there's anything stopping you from putting just a simple javascript redirect in your GitHub page to redirect to that page.

Related

How to redirect non-existent website from one domain to an existing website on another domain using https and http?

I purchased a domain name (we'll call it "exampledomain.com"). There is no website tied to the domain and there are no plans to do so.
I want to redirect all URL variants of this domain to an existing website I also own: (we'll call it "destinationdomain.com")
If a user types any of the following, I want to redirect them to https://www.destinationdomain.com/
https://exampledomain.com/
https://www.exampledomain.com/
http://exampledomain.com/
http://www.exampledomain.com/
How would I set this up?
What I believe I need to do is:
Add exampledomain.com as a Subject Alternative Name (SAN) to an existing SANs supported SSL I own for an existing website.
Point IPs of exampledomain.com to the IP used by destinationdomain.com
Add code to destinationdomain.com so that when it receives requests from the above exampledomain.com variants, it performs a 301 redirect to https://www.destimationdomain.com
POSSIBLE ALTERNATIVE?
Set up domain forwarding from exampledomain.com to https://www.destinationdomain.com/
Add exampledomain to destinationdomain.com's Subject Alternative Names (SANs)?
Is this accurate, or can I achieve this without step 3?
Thank you in advance.
Point IPs of exampledomain.com to the IP used by destinationdomain.com
You need to point it somewhere. It doesn't have to be the same server as you are using for your other site. (e.g. I might do this all in AWS and use an S3 bucket to do the redirect).
Add code to destinationdomain.com so that when it receives requests from the above exampledomain.com variants, it performs a 301 redirect to https://www.destimationdomain.com
The server that you point the new domain to does need to issue a 301 redirect.
This doesn't need to be anything to do with the old domain though. Even if they are hosted on the same server, you can use Virtual Name Hosting to use separate server configurations.
Add exampledomain.com as a Subject Alternative Name (SAN) to an existing SANs supported SSL I own for an existing website.
You will need the domain in the certificate for whatever server is hosting it. If you're using the same server then setting it up as a SAN makes sense.

What is with the reccommendation to use `www` domain on GitHub Pages?

If you look at the documentation for GitHub pages, it has a pretty strong reccommendation to use a www domain for your custom domain site hosted on GitHub Pages.
From here: https://help.github.com/en/articles/about-supported-custom-domains#www-subdomains
A www subdomain is the most commonly used type of subdomain, in which
the www stands for World Wide Web. For example, www.example.com is a
www subdomain because it contains the subdomain part www.
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.
Does this mean if I do not use a www domain I will not get the benefits of a CDN or DDOS Attack Protection?
What is the technical reason why there is a difference between a www and non-www domain here?
The difference lies in how you point the site to GitHub's servers in DNS.
The simplest use of DNS is to point a domain name, at whatever level, at an IP address, using an A record. The same address will be used by all users, and can be changed only by the owner of the "zone" where the A record was added - in this case you, configuring the zone of your custom domain.
A smarter way is to alias a particular domain name to a different zone - in this case one managed by GitHub - using a CNAME record. The owners of that zone can then change the IP address as needed, and can even give different answers to different users based on their location (which is where the CDN reference comes from).
The key restriction however is that you can't use a CNANE as the root of a zone. See this Server Fault question for the technical details.
If you own "example.com", you can point an A record for the root of that domain at one GitHub IP address (or a few, selected essentially at random by visitors), but will give GitHub more freedom to route the traffic if you point a CNAME for a sub-domain, like "www.example.com".
Some DNS providers offer tools to work around this limitation by adding a fake record for the root of the domain that looks like a CNAME, but may be labelled differently (e.g. ANAME, ALIAS). When asked for the root A record, the DNS provider looks up the actual A records for that domain and returns those. This is useful for records which change over time, but because the address is being looked up by your DNS provider not the actual visitor, it may still prevent GitHub serving the best address for that visitor.
DNS does not provide a reliable mechanism for forwarding on apex/root records (e.g. example.com) but does for subdomains (CNAME). In practice this means that while you can point an A record to a single IP address corresponding to a node on Github's infrastructure, they aren't able to route DNS lookups for your apex record to other IP addresses that are closer to the request (CDN) or use DNS to mitigate the effects of a (D)DoS attack.
Some DNS providers do offer synthetic records (ALIAS, ANAME) that mimic the behavior of a CNAME record with apex domains (e.g. dnsimple), but they're not widely available, introduce additional complexity and latency, and don't provide the same level of geographic routing opportunities to Github et al.

implementing custom domain name

I am currently making a personal website. I created the templates and I purchased a google .dev domain. I decided to host it through GitHub-pages. I am able to get to the website by using "username.github.io". When I add the custom domain name (myname.dev) the "enforce https" button cannot be clicked. It also gives me the error, "Domain's DNS record could not be retrieved."
In the google domains site, I "use the google domains name servers", and DNSSEC is enabled. But I don't know what to put in for the "registered hosts" and the "synthetic records". Perhaps this is my issue? Please let me know!
You should follow "Using a custom domain with GitHub Pages", especially considering GitHUb pages only supports two types of custom domains:
apex domains ( example.com is an apex domain because it doesn't have any subdomain parts. Whereas www.example.com is not an apex domain because it contains the subdomain part www.)
subdomains (www.example.com is a www subdomain, blog.example.com is a custom subdomain)
In your case, to set up an apex domain, such as example.com, you must configure an ALIAS, ANAME, or A record with your DNS provider. See "Setting up an apex domain".

Allow use of both user.github.io domain and custom domain

I am using github pages and want to be able to use both the user.github.io domain and my custom domain example.com. I have successfully set up a custom domain, but I don't want to be redirected to it when going to user.github.io. Is this possible?
No, if a custom domain is deployed, your user.github.io domain will always redirect to the defined custom domain

How can I redirect a page url (example.com/pageurl) from my domain registrar?

So I have a Tumblr, which means I can't use htaccess, and am hoping there's a way I can redirect page url (example.com/post/2234324/posttitle to example.com/page), purely from my registrar (Namecheap).
Is there host records I can change, or something else, to redirect urls on my domain?
If you have access to your DNS and can add A records, etc. then look at CNAME record. Here you can enter an alias domain. This is commonly used with Amazon S3 when you set cdn.myco.com and your amazon bucket is cdn.myco.com.amazons3.com or if you use Google Apps for Business to manage your email.
SEE: http://support.google.com/blogger/bin/answer.py?hl=en&answer=58317
good instructions for various hosts