Need help w/ custom domain - github

I purchased a custom domain from Google (kairns.rocks) but am having trouble linking it to my Github repo (https://0n11san.github.io/p1/).
I tried "forwarding the domain" but that didn't accomplish what I wanted (for the address bar to read "kairns.rocks" as opposed to "https://0n11san.github.io/p1/"). Moreover, in some browsers (Chrome), I'm noticing the URL cannot be found, yet in others (Firefox / IE) the URL resolves to the github URL. Of course, even in the latter case, this is still problematic b/c I want the address bar to read "kairns.rocks" instead (not merely re-direct).
I've tried adding a CNAME file to the Github repo w/ both "kairns.rocks" and "www.kairns.rocks" listed. I've also tried changing the "DNS settings" > "Custom resource records" on Google domains to list GH's IP address and my GH page URL, but that doesn't seem to work either. Is there some sort of time requirement for the server(s) to catch up or something else I'm missing?

In addition to the CNAME file, ensure your github pages settings have kairn.rocks in the custom domain section.
go to custom resource records and set name: www, TYPE: CNAME, TTL: 1h, and DATA: https://0n11san.github.io/Project1
Once this is all done, you'll need to wait anywhere from 1 hour to 48 hours for the settings to all settle down.
Here are some good resources to help you troubleshoot:
- https://help.github.com/articles/troubleshooting-custom-domains/#github-repository-setup-errors
- https://help.github.com/articles/troubleshooting-custom-domains/#dns-configuration-errors

So to anyone following along, I was receiving 302 / 404 errors not due to an incorrect handling of data but rather b/c the servers were still catching up. I suggest following the guides #cptwonton references and then working on something else for at least and hr or so (if not more time, especially if your website is robust or your hosting service is less accommodating).

Related

Domain not resolving to GitHub pages with Godaddy

I have a github project and have generated a gh pages from it and is forwarding the domain from godaddy. But I am facing issues.
1. First it is a project's website and I can't add '/' and this forces me to opt for domain forwarding.
2. Second, GitHub complains about my setup and I have trouble figuring out what to do.
Thanks in advance.
Check the GitHub docs, in case you want to point the naked domain to your gh-pages add this A records:
your-domain.tld A 192.30.252.153
your-domain.tld A 192.30.252.154
For example check this project: http://go-www.com/
The repository name needs to be go-www.github.com and also you need to have a CNAME file within the repository;
In this case, the content of the CNAME is:
go-www.com
Within your DNS provider, you will need to create a CNAME for your domain pointing to your GitHub account at github.io, for the example.
www.go-www.com CNAME <your-github-account>.github.io
Yes exactly, you can do such a thing with your Gmail to be more shorter and make you so quickly, like mailer#yahoo.com is one example, you can change your account with some none relivant letters but in a proper field like HTML5 !!!

Have mutliple urls to point to the same GCS bucket

We have multiple websites on GCS buckets for our subdomains:
site1.oursite.com
site2.oursite.com
site3.oursite.com
How to make www to work as well with these subdomains, so that we have:
www.site1.oursite.com
www.site2.oursite.com
www.site3.oursite.com
to point to right bucket.
To make www to work with your sub-domains, you have to create buckets with names :
www.site1.oursite.com
www.site2.oursite.com etc to get access website via www.site1.oursite.com, www.site2.oursite.com.
To access URL as www.site1.oursite.com, you have to create a CNAME record in DNS that redirects requests from www.site1.oursite.com to the Google Cloud Storage URI. To accomplishing this, you need to publish the following CNAME record in DNS:
www.site1.oursite.com CNAME c.storage.googleapis.com
I, too, believed the statement
If you want the test.example.com to serve the same content as is served from www.example.com, add a CNAME record that aliases "test" to "www". A separate bucket is not needed in this scenario.
on the documentation page and tried getting this to work for hours. Interestingly, that help text seems to be the only resource on the web claiming that this works. I believe, that this is an error on the side of those persons who wrote that text.
I resorted to additional buckets with simple http redirects for now as a workaround. Obviously, that's less than ideal.

Jenkins embeddable build status icon not shown

I want to use the Embeddable Build Status Plugin for Jenkins. I am using Cloudbees. I granted Job/ViewStatus permissions to the anonymous user. When I add the Markdown to the README.md no icon is shown. I tried both the protected and the unprotected link.
# protected
[![Build Status](https://johnjohndoe.ci.cloudbees.com/job/TypedPreferences/badge/icon)](https://johnjohndoe.ci.cloudbees.com/job/TypedPreferences/)
# unprotected
[![Build Status](https://johnjohndoe.ci.cloudbees.com/buildStatus/icon?job=TypedPreferences)](https://johnjohndoe.ci.cloudbees.com/job/TypedPreferences/)
By default DEV#cloud Jenkins instances are not visible, at all, to anonymous users. If you have configured role-based security and want anonymous users to have the selected roles, configure your system and check the box Enable read-only access for anonymous users.
Well, the question has been asked some time ago, but for others reaching it here, having the problem, that the image is still not shown within the Readme.md on GitHub/GitHub-Enterprise after performing the above mentioned configuration:
Make sure that both services are using the same protocol. In my case, we had GitHub-Enterprise running under HTTPS and Jenkins was running on HTTP.
The badge will not be shown in this case because of the possible security breach introduced by mixed content. You will find an appropriate error message in the console output of your browser (i.e. F12 in Chrome):
Mixed Content: The page at 'https://.../README.md' was loaded over HTTPS,
but requested an insecure image 'http://.../job/master/badge/icon'.
This request has been blocked; the content must be served over HTTPS.
It's of course quite obvious but something that can also be easily missed when searching on the wrong track.
I had an issue with space in the project name, so do not forget to replace spaces with %20
example:
[![Build Status](../Long%20Project%20Name/...)](.../Long%20Project%20Name/...)

Set up custom subdomain for Jekyll Blog hosted in Github Pages

I created a Jekyll-powered blog and am hosting it with GitHub Pages.
Now, I want to set up a subdomain (blog.example.com), but can't make it work.
I have added a CNAME file with the text: blog.example.com. And I have added two A records in my Dreamhost account for the subdomain, both pointing to 204.232.175.78, provided by GitHub.
Any idea about what the missing part is, or if I'm doing something incorrectly?
The setup is different for domains like example.com and sub-domains like blog.example.com.
In case of a sub-domain: blog.example.com
Go to Domains | Manage Domains in your webpanel
Locate blog.example.com, click Delete in the Actions column
Wait 10 minutes, and then click the DNS link below example.com
Add a CNAME record:
Name = blog
Type = CNAME
Value = yourusername.github.io. (yes there is a . at the end!)
In case of a domain: example.com
Go to Domains | Manage Domains in your webpanel
Locate example.com, click Edit in the Actions column and switch to DNS only hosting (it's at the bottom)
Go back to Domains | Manage Domains in your webpanel
Click the DNS link below example.com
Add an A record:
Name = (blank, nothing)
Type = A
Value = 185.199.108.153 (GitHub, from this page)
Add a CNAME record:
Name = www
Type = CNAME
Value = yourusername.github.io. (yes there is a . at the end!)
(Yes, you need both the A and CNAME records in this case.)
Btw, the only reason I know this is because I did the same thing last weekend. I was quite lost, but the helpful support guys helped me half way, and I figured out the rest. This procedure works for me, I needed both cases so I tested both.
Because of the way DNS records are cached across the internet, these sorts of changes can take a few hours to take effect. It looks like the address you provided resolves correctly now.

How to point domain to site hosted on github pages?

I have created a website and placed it on github in the repo with USRNAME.github.com. First when I went to that website, my website displayed correctly. Then I bought a domain, lets say example.com. I placed a CNAME file in the repo, so now USRNAME.github.com forwards to example.com.
I understand that I have to point my domain at the github server in order to allow my website to be displayed at example.com, but I'm not sure how. I created the site through gandi.net. I tried editing the zone file to have a CNAME entry with USRNAME.github.com but that didn't work. I also tried to edit the DNS server name but no entry I placed in there seemed valid.
Any help would be greatly appreciated. Thanks.
As you understood, the CNAME file on the github side must be completed by a custom DNS setting on the registrar side, in order to complete the matching between your domain name (example.com) and the subdomain on github. The CNAME file is required by github to route incoming request on its own DNS Zone (192.30.252.153) to the proper user subdomain.
Therefore, the missing step is having your domain actually pointing to github's DNS Zone. On the registrar side (gandi.net), you achieve that by editing the DNS Zone file attached to your domain. This zone file describes the hierarchical domain name structure of the DNS Zone that your very domain pertains to. What you are about to do is changing the mapping between some parts of your DNS Zone and IPs. When you want to point a top-level-based domain name to an arbitrary IP v4 (here, github's DNS Zone located at 192.30.252.153), you are interested in redefining an A Record (A simply standing for "Address") in your own zone.
A specific answer for gandi.net:
head to https://www.gandi.net/admin/domain
click on the domain you want to use
at the bottom of its admin page, under "Zone files", click on "Edit the zone"
Here you can see the list of settings for your zone file. A new feature of Gandi is that of "versions": different versions of the zone file can be created and only one is active at a time.
To tweak the zone file for github, first click on "Create a new version". It will simply create a copy of the currently activated version.
The preferred way for wiring is to add a new CNAME mapping, from *.{yourdomain.tld} to {youraccount}.github.io. For instance, my kaibun.net domain must be the facade for chikamichi.github.io, so I added a CNAME mapping *.kaibun.net to chikamichi.github.io. (the final dot is mandatory in gandi's config).
You may want to edit the * and # record types settings as well, for instance if you just want the whole DNS zone to behave like a "proxy" (meaning it will "redirect" to your github subdomain no matter what). This is not required though, so this step is optional. I assume you are still in Normal edit mode. Click on the Pen icon on the right side of the * line. Keep all fields untouched but the "Value" one: paste the github URI in (the github documentation recommends using 204.232.175.78; you may have found different values on the internet, though: don't use them). Validate, then proceed the same for the # line.
Do not forget to click on "Activate this version" when you're ready. Check that the "Active version number" is correct. The changes will take some time to propagate.
Detailled examples and procedure: http://wiki.gandi.net/dokuwiki/en/dns/zone/a-record
You need to setup an A record which points to the github server. You said you used gandi.net, so basically you would change your DNS settings for the top level domain by adding(or modifying) an A record to point to github.
If you want, you can add a subdomain (like www.) by adding a CNAME in your DNS to point to the top level domain or an A record which, again, points to github.