Custom domain
Custom domain
custom domains allow you to serve your site from a domain other than akshitmodhiya.github.io.
what to write in it as "https://akshitmodhiya.github.io/xypo" not working
Custom domain
Custom domain
Custom domains allow you to serve your site from a domain other than akshitmodhiya.github.io.
what to write in it as "https://akshitmodhiya.github.io/xypo" not working
To use Custom Domain in Github Pages. You need to own your own domain name.
In order to use /xypo in your github domain . Create a folder named xypo in your repository and place all the web files there.
Related
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.
I have a couple of issues I believe are related regarding githubpages.
First, when trying to create my user page by naming the repo the same as my username, I expect the url to be this myusername.github.io.Instead it looks like this myusername.github.io/myusername.
I have been to work around this by naming my repo myusername.github.io, which produces the correct URL.
Now, I want to create a custom domain with this user page. I can use my custom domain with the above workaround, but this now affects all other repos which use github pages. For example, I setup myusername.github.io to use mycustomdomain.com. But now I have another project that uses gh pages called someotherproject. The url now redirects to mycustomdomain.com/someotherproject instead of someotherproject.github.io.
Is this working correctly?
But now I have another project that uses gh pages called someotherproject. The url now redirects to mycustomdomain.com/someotherproject instead of someotherproject.github.io.
This is what described in the official documentation "Supported custom domains"
After you configure a custom domain for a user or organization site, the custom domain will replace the <user>.github.io or <organization>.github.io portion of the URL for any project sites owned by the account that do not have a custom domain configured.
For example, if the custom domain for your user site is www.octocat.com, and you have a project site with no custom domain configured that is published from a repository called octo-project, the GitHub Pages site for that repository will be available at www.octocat.com/octo-project.
That was reported as an issue in 2016:
I'm afraid this can't be disabled. If you have a CNAME file in a User pages site you other project pages will redirect to this Url.
You can override it by adding a different CNAME to your project page though or just create another Project site to act as your user page.
In 2020, here is a possible workaround, mentioned by Oliver Vorasai:
The Problem
Have portfolio repository at https://github.com/username/username.github.io
https://github.com/username/username.github.io uses custom domain at www.username.com
Created another project at https://github.com/username/my-new-project
Create gh-pages branch so Github Pages will host it
my-new-project should be accessible at https://username.github.io/my-new-project/
https://username.github.io/my-new-project/ it is automatically redirected to www.username.com/my-new-project and causes 404.
The Solution
Rename the https://github.com/username/username.github.io repository to https://github.com/username/username-something
https://github.com/username/my-new-project should now be available at https://username.github.io/my-new-project/
www.username.com is still working, subsequent projects should get standard Github Pages urls without custom domains.
Not ideal though, as mentioned by Emma Sax :
I still think the best solution would be an option in the GH Pages settings of a project page to not redirect the domain of a project page.
This way, users would have a choice of having username.github.io/project-page redirect to www.customdomain.com/project-page or having it stay where it is.
It's frustrating to me that we even need to find an alternative solution at all.
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".
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.
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