Create a Github Pages subdomain while main domain is elsewhere - subdomain

I am trying to host a custom subdomain with Github Pages.
My apex domain (http://example.com) is pointing to a custom server (not Github Pages).
I am trying to get a subdomain of this (http://subdomain.example.com) to host a Github Pages site off a project page.
I have created a CNAME record for the subdomain pointing to http://username.github.io but it comes up with this error:
Your site's DNS settings are using a custom subdomain,
subdomain.example.com, that's set up as an A record. We
recommend you change this to a CNAME record pointing at [YOUR
USERNAME].github.io. For more information, see
https://help.github.com/articles/setting-up-a-custom-domain-with-github-pages/.
I have also tried moving the project to its own Github organisation and pointing the CNAME to organisationname.github.io but it has the same result.
In both instances I have waited 24 hours for the DNS to propagate.
I have tried following the official tutorials and searching in StackOverflow for answers but have not been able to find anything for this situation.
Is this even possible to do or do the A records for my http://example.com domain affect all the subdomains below it?

Found a solution with Github support.
Turns out the answer is yes you can. I just had my apex domain configured to use Cloudflare and totally forgot about it. I made the changes described in my original post in Cloudflare and it all worked fine.

Related

Is it possible to add gatsby blog on a subdomain to pre existing gatsby site?

My question is:
I want to create a gatsby site (the main section of the website). I also want a gatsby run blog with netlify CMS (which is what the site will be hosted with) on the subdomain blog.site.com.
Is this possible? What would I need to research/know to make this happen? For the domain, I will use google domains if that information is needed.
You just need to create two different Gatsby sites:
1 for the main section of your site
1 for your blog
On Gatsby's side, you don't need any extra configuration (not even pathPrefix), is just a regular site. The configuration must be done in the server (Netlify) adding each site to a custom domain.
Regarding the Google domain, you will only need to add the proper DNS in each server. You may find this article insightful: https://medium.com/#jacobsowles/how-to-deploy-a-google-domains-site-to-netlify-c62793d8c95e

Pages on my GitHub using custom domain instead username.github.io

I try using GitHub pages to deploy my website
GitHub pages
I don't know what is causing this and I have already tried searching all setting related to GitHub pages on my account but still can't fix it.
I thought this problem is related to my GitHub student pack, because my account is connected to Namecheap and I bought a domain there and I am using InfinityFree as hosting (and parked my domain in InfinityFree). But I can't find setting about this.

Let netlify use a subdomain thats also used on a different site

(how) is this possible:
I have 2 netlify sites main-app and sub-app.
main-app has a custom domain (www.main.com).
I now want to make the 2nd site sub-app using the custom domain sub.main.com but Netlify forbids this and notes that I already use the respecity domain main.com.
Any help?
It is possible to use subdomains. It is discussed in detail in their docs: https://docs.netlify.com/domains-https/custom-domains/
You already have a Netlify subdomain where your app is hosted, of type myapp.netlify.app. Now you need to point your subdomain to this instance. If you use for example Namecheap, you do it like this: https://www.namecheap.com/support/knowledgebase/article.aspx/9776/2237/how-to-create-a-subdomain-for-my-domain/
Here is Netlify's instructions for doing this if you don't host your domain with them (aka not using Netlify DNS) https://docs.netlify.com/domains-https/custom-domains/configure-external-dns/
Similar DNS editing as in Namechrap will be seen on all other domain hosts. Once this is set up and has had time to propagate (give it 10 minutes to an hour) you proceed with hooking it up in Netlify. Your error message should now be gone.
Remember that you need different DNS records on your domain host for the main app and the sub app.
You can add a subdomain in the netlify panel and in you DNS manager / hosting provider add the records as CNAME with the domain provided by netlify.

How to host my own website with my own html documents

I know this is the most basic of questions. I made my own website in HTML documents. I bought a domain name from google. How can I publish this, how can I host it? I don't want to use any website creator, I want to publish my own files that I worked on.
You can use Github to host your website on your own domain.
You have to add the whole files needed for the website. Then in the settings of your repo use the Github pages feature and enable it. Change the source of Github pages to host in your own domain. Then you have to add some A and CNAME records of your domain to point to github servers.
Here are the full steps for the process - https://www.geeksforgeeks.org/publish-websites-on-github-pages-with-a-custom-domain/

Issues getting to the right file when using a google domain pointing to github pages

Apologies in advance for the painfully newbie question but I am really stuck here.
I have a Google hosted domain: techpalewi.international
That I need to link to file, which is hosted on my github user page: porcoespinho.github.io/techpalehui_international_website/scripts/index.html
So far, I have:
Created a CNAME file on my Github project, pointing to the google domain (techpalewi.international)
I have created the Custom resource records as advised in github pages (i.e. A pointing to 192.30.252.153 and 192.30.252.154. And a CNAME record pointing to my github pages project repo: porcoespinho.github.io.)
So far I can get to the right page if I type:
http://techpalewi.international/scripts/index.html
but not if I only type the domain name:
http://techpalewi.international/
Can you please advise how I can get to the right file only pointing the domain name?
Thank you,
Luis
Kudos to Ryan Burgess # Netflix who kindly answered this question offline:
It turns out that when one uses a custom domain on GitHub pages, it defaults to landing the project's root page. Thus, the most efficient solution was to move the HTML and CSS files out of the scripts directory and into the root directory. This did the trick masterfully !!!!