Custom domain on GitHub Pages not working properly - github

I purchased a domain on NameCheap, and followed a step-by-step guide to configure it with GitHub Pages (I'm pretty new to all of this).
But my GitHub page is not using the custom domain even after configured
The first step was to configure the 4 A records and the CNAME with my username in github:
After that I went to the repository that has my username and set up GitHub Pages, and then added my custom domain:
So far, everything worked perfectly, he re-deployed and added a CNAME file to the master branch
But when I try to use GitHub Pages in other repositories, it still gets the old domain (username.github.io)
What I really wanted was for this project to be in custom.domain/project-name
Any light on what I'm doing wrong?
I didn't find anything different from what I did looking at the official documentation
**Of course I didn't use these names from the images, I just removed the original name.

Related

Github pages URL keeps redirecting to old, deleted custom domain

i host my jekyll blog on github and used to use a custom apex domain for it and that worked just fine.
Yesterday i wanted to discontinue the domain and go back to the standard .github.io adress, so i deleted the DNS Entrys on Namecheap and the custom domain entry in the github repo settings under "Pages" (also made sure the CNAME file is gone, i even deleted the whole repo and set it up from scratch) but still the .github.io Adress redirects to my old custom domain and shows a 404.
Is there a way to solve this?
I can think of trying to assign a new custom domain, but i dont have one right now and just want to use the standard domain for now.

After setting up my own domain on Github Pages, I get an InvalidDNSError

Phenomena
After setting up my own domain on Github Pages, I get an InvalidDNSError.
The following message will appear
"Both www.example.work and its alternate name are improperly configured
Domain's DNS record could not be retrieved. For more information, see Learn more (InvalidDNSError). We recommend you change this to a CNAME record pointing to username.github.io."
Expected value
I want to publish a website using github pages on my own domain.
From your question, I assume that you are added www.example.work as custom domain in the github pages section and you might be missed the DNS settings part.
After adding custom domain in github pages, you need to setup a CNAME and 4 A record under the DNS settings of you custom domain.
you can find the detailed steps here in the official documentation of github.
You need to change your domain DNS to CNAME and try again.
as a Name you type www and in the target URL form, GitHub link.
I ran into this as well. After double checking the DNS with dig and continuing to get the same error, I removed the custom DNS on the GitHub Pages Settings form (using the "Remove" button) and then re-added it. That cleared the error for me.

How to share Github Pages via link-only option?

I am trying to share my Github Pages only via link (if possible, keeping my repo private), just like the link-only share option of Google Drive. Specifically, only those with the URL can access the github.io website that I made, while the repo (the github.com website) is preferably not accessible to anyone. May I ask if it's possible, even via third-party tools?
if you share any link from a private repository, you will get an error 404.
Something you can do to test this behavior... is open a chrome tab in incognito mode and paste your link ... there you will see the error.
If you want to share any link in one of your repositories, it must be Public.
If there is another possibility, please let someone tell us how to do it. regards
In general, I don't know if there's a third-party tool to do the work, but it's easy to make it by hand, provides that you're not creating a lot of such pages.
First, is it possible to make a public GitHub Pages based on private repository?
Yes. Just create a private repository, head to Settings >> Options, find the section called "GitHub Pages" and set the source branch. This process is just the same as creating any GitHub pages.
P.S. you SHOULD see the message
Caution: This repository is private but the published site will be public.
This states exactly what you want.
only those with the URL can access the github.io website
Well, just make the URL difficult to guess.
For example, named the repository as a random string "uk5KKR".
However, this will likely mess up the repositories in your profile, soon after you'll be difficult to find the correct repository that you need now.
Instead, you can named name in this way: "githubpage_uk5KKR".
For other people, it's difficult to find this page when they are not provided the URL. And for you, just search "githubpage" in your profile and this repository should appear.
Here's a few notes:
You should adjust the length of the random string according to how secure you need.
It's also possible to make a quarantine area by the path name in a repository. For example, create paths "n2jnHG" and "4xSN2g" in the same repository of GitHub page, then the contents in these two paths could be shared with different people.
Finally, note that if anyone failed to keep the URL secret, the whole page is not secret anymore. It could even become an entry in Google search result.

I am getting a warning for the website deployed via Github pages that uses a custom domain. how do i get around it?

Problem:
I am getting below warning on github pages. However, my custom domain http://www.dilipagheda.com still works.
I am curious why i am getting this warning and do i need to address it? if yes, how?
Error:
The custom domain for your GitHub Pages site is pointed at an outdated IP address. You must update your site's DNS records if you'd like it to be available via your custom domain
I'm not 100% sure why it still works (maybe they're phasing people out to the new addresses?) but here's how to fix it.
Go to your domain registrar, where you have previously set up your DNS records. You need to update your A records to the new ones provided by github. Right now they are:
185.199.108.153
185.199.109.153
185.199.110.153
185.199.111.153
After that, you need to delete and re-add your custom domain in the repo settings. I got these IP addresses and instructions here in the github documentation.

Use github pages to host a production website

I've been using github pages in order to showcase my progress on a simple website I am building but now I saw the option to assign a DNS name to the repository.
This made me think that I could actually avoid buying a service (hostgator, bluehost etc) and actually host my site in github pages.
What is your recommendation on this? Is github pages used for this kind of purposes?
Yes, Github Page is a great place for you to host a static website. All you need to do is to purchase a domain and configure the DNS. Basically, it is a free hosting service I think you can put it that way.
Here is a tutorial on how to set up your Github Page with a custom domain: https://help.github.com/articles/using-a-custom-domain-with-github-pages/