How to remove repository name from a custom domain hosted in Github Pages? - github-pages

I have made a NameCheap domain and linked it to GitHub pages properly.
If the site is live at a.me/resume, how can I make it just a.me and remove the repository's name from the url?

Open the repository and go to settings - pages - scroll down to the custom domain section and enter your custom domain and click save. You'll want to delete the old CNAME because when you save the custom domain it should create a new CNAME automatically.
I would also recommend verifying the custom domain you want to use with GitHub if you haven't already done so as a preventative measure to discourage domain squatters from using it. For that you'll just need to go to your account settings - pages - add a domain.
In order to verify the custom domain with GitHub, you'll need to add the verification code they give you to your DNS configuration as a TXT file.
https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/verifying-your-custom-domain-for-github-pages

Related

Cannot add custom domain to my current app

I am trying to connect custom domain to my current project the issue is there is no place to add such domain ,
And why does goodie Claud generate 2 links (domains) for the same app makes no logic.
You can usually set up a custom domain completely in the Firebase console. To do so:
If you haven't set up Firebase Hosting for your project, open the
Hosting page of the Firebase console, click Get Started, and click
through the setup instructions.
Open the Dynamic Links page of the Firebase console.
If you haven't used Dynamic Links before, click Get Started.
Otherwise, click Add URL prefix from the drop-down menu.
Then, complete the setup wizard, specifying the domain and path
prefix you want to use when prompted.
Please follow this documentation to set up the custom domains and further information.

Custom Domain already taken error in Github

I am trying to add my custom domain for github pages but it is continuously giving error that the Domain is already taken. I have already verified my custom domain on github with TXT DNS entry. But as soon as I add github IPs in A DNS entry, it starts pointing to some other project that is not mine. I also tried adding CNAME entry.
I also faced the same issue. As pointed out by GitHub Support:
This error generally occurs when a custom domain has previously been owned by another GitHub user, or the domain has been added to a GitHub repository in error.
After domain verification, it takes almost 7 days to remove it from its current repository.
If you want to get it released before that, you can contact
GitHub Support

GitHub pages defaulting to a randomly generated name instead of <whatever>.github.io

I'm working in a repo I created under an organizational GitHub
When I publish the repo via GitHub pages the URL defaults to a randomly generated string, such as
http(s)://windy-waterfalls-e5r23og9.pages.github.io/
I'd like it to default to http(s)://<username>.github.io/<repository> or http(s)://<organization>.github.io/<repository> so that the URL is explanatory of the repo, and so I don't have to pay/manage my own domain
Is there a way to do this?
This occurs when the gh pages visibility is set to private
According to About subdomains for privately published sites
Privately published sites are available at a different subdomain than publicly published sites. This ensures that your GitHub Pages site is secure from the moment it's published.
We use a unique subdomain for the privately published site to ensure that other repositories in your organization cannot publish content on the same origin as the site
According to Organization-level custom domain not working for internal repository pages #23350
For security reasons, private Pages sites (the ones with a random default hostname that enforce authentication + authorization on access) need to be isolated.
Workarounds
If the info isn't sensitive, you can go to Settings > Set the Visibility to Public
You can still set a custom domain to avoid having a long set of garbled characters in your URL

How to test my website on PythonAnywhere before setting up my CNAME?

I've gotten part way through deploying my new webapp on PythonAnywhere, and currently it's got the 'Coming Soon' place holder.
When I refresh the app from the web tab it tells me I need to set the CNAME,and from what I remember that involves redirecting from my Domain Service (Gandi in this case).
There is a problem with your domain name configuration. Take a look at the DNS setup section below for details. Be aware that DNS changes can take some time to propagate across the internet. The exact time they take will depend on your domain configuration, but it could be as long as a day.
You domain's current CNAME is webredir.vip.gandi.net. Check this help page for more information about how to set it up correctly.
I don't want to do that yet.
What I want is to 'preview' my page at webapp-XXXXXX.pythonanywhere.com before it goes live.
This suggests that I:
add a line with the IP address you got from the previous step, then a tab, then the host name you've set up the web app with in PythonAnywhere.
But I've not found that to work, and besides, how would that let me see what's hosted online? It would just let me access it via a different URL.
Here what I added to my hosts file:
50.19.109.98 webapp-206115.pythonanywhere.com/
How can I test my website on PythonAnywhere before setting up my CNAME?
The easiest solution i found for this is to rename the webapp to <username>.pythonanywhere.com. Thats the default for the free subscription and it still works for me after i change to a payed plan. But i dont know if this is because i already had registered a webapp under this name or if this always works.

How do I allow users to map their domains to a url on my site?

How do I allow users to map their domains to a url on my site? (like how tumblr or blogger does)
The app is being developed in Django. I want the users to be able to map their domains to mydomain.com/username (is this possible or do I need to have a format like username.mydomain.com?)
Also my app runs on a VPS so I have my nameservers as ns1.mydomain.com and ns2.mydomain.com.
easiest way is through domain cloaking. most domain name providers will allow users this option.
another easy idea is to provide your users with a very generic html page that just includes their url on your site in an iframe and have them places that as their default directory index (e.g. index.html).
both the aforementioned would always show the base domain (without trickery). as noted below, a CNAME DNS record would take care of this, assuming they have the ability to edit DNS records...
www.someuserdomain.com. CNAME username.yoursite.com
In that case, you will have to consult your specific hosting setup for how to programmatically change your DNS settings. Whether you can actually do this depends on the host. If your server is running a DNS server that you have access to, you can probably change it that way.