Github Page Custom Domain Published But Site Can't Be Reached - dns

I have purchased a custom domain from Google Domains and have been attempting to add the custom domain to my Github page, I found a few tutorials and followed all the instructions but my page is coming up with this page
On my Github page's settings it says that the site has been published and I'm pretty sure all the settings are correct, here's how it looks:
I've also checked that my CNAME file has only one domain - www.davidstewart.io - and all the settings on my google domains seem to be right:
Here's a link to the github repo also if that will help: github.com/davez01d/davez01d.github.io

Related

How to have a www.myapp.com and a my.myapp.com for a MERN stack app

I have recently finished building an app. Currently the domain is www.myapp.com (not really just for example purposes)
the www.myapp.com is hosting the landing page and the dashboard is accessed throught www.myapp.com/dashboard
I would like to host my dashboard at my.myapp.com and only the landing pages on www.myapp.com
I am Using the MERN stack and have my domain through Godaddy while using Heroku to serve my files. Do I need to purchase a new domain at my.myapp.com ? or Do I need to have 2 heroku servers? One for www.myapp.com and another for my.myapp.com?
Also Is my.myapp.com considered a subdomain of www.myapp.com ? I find these terminologies confusing and cant find an answer anywhere.
Here is another example. I work out at lifetime fitness. They have a website at www.lifetime.life and after you login it takes you to my.lifetime.life
Are these two separate servers?
So I found a solution.
Here is my setup.
I have purchased my domain from godaddy
my domain is www.happyNewYears.com (not really)
(Ill get to the my.happyNewYears.com part in just a second)
I am using Heroku to deploy my react app.
Now I have finished my react app, its a MERN stack app. The file structure is in this image
You can see this has a PROD1 folder, which has all my backend logic, and a frontendReact folder that contains the react build.
When I deploy this to heroku I currently am deploying it all on one server at www.HappyNewYears.com
My goal is to have www.HappyNewYears.com be the landing page, and the dashboard to be at my.HappyNewYears.com
So in Heroku, select your app and go to settings. Once in settings there is a button to "Add domain"
Click this and you will see this pop up
Make sure you are adding the www.happyNewYears.com
not just happyNewYears.com
This will return you a heroku link something like this, ( patience Im getting to the my.happyNewYears.com part)
curly-pineapple-6s74zofl10g9mlq7w7532opf.herokudns.com
Note: This Link is pointing to www.HappyNewYears.com because when I added the domain in Heroku I added it with the www. so this link always points to the www.
Now you are going to go Back to your godaddy account and find the domain you are wanting to work with, In my case its www.happyNewYears.com
Now Select DNS And find the area of the page that looks like this below.
You will notice that you can Add a DNS record. Click the button to add,
This will pop up a few Inputs like this below,
Make your type a CNAME, Im still setting up the www. so lets make the name part www
Then in the value input you are going to post your curly-pineapple-6s74zofl10g9mlq7w7532opf.herokudns.com link
Note: Remember this link was created in Heroku with "add Domain" when we added it we did it with the www. so it was www.HappyNewYears.com
Now when we add this CNAME to godaddy give it a sec for the DNS to update. I usually happens pretty quick but can take 2 days (Usually happens in 5 minutes for me)
Now our app should be displayed at www.HappyNewYears.com
Now, Lets deploy our app to my.HappyNewYears.com
Lets Go back to Heroku, select our app and select Add Domain again,
Instead of putting www.HappyNewYears.com, now we are going to put my.HappyNewYears.com
This will return you another Heroku link something like this
marine-herring-n2ti9mlz8inb3o1x3qhaualu.herokudns.com
Now go back to your GoDaddy account and select the domain again and go to DNS.
Once we are back in DNS settings we are going to Add another DNS record. This will be a type of CNAME but instead of putting www for the Name, we are going to put my (this can be whatever you want). In the value we are going to paste our new Heroku link we just created for my.HappyNewYears.com
In my case it was this link
marine-herring-n2ti9mlz8inb3o1x3qhaualu.herokudns.com
Now Once you add this CNAME record give it a second to update in godaddy.
You will notice your app is now hosted at my.HappyNewYears.com (or whatever your domain is ex. my.yourWebsite.com)
Now this is hosting entire app on my.happyNewYears.com and www.happyNewYears.com
Note:
If you want your landing to on www.HappyNewYears.com and the Dashboard my.HappyNewYears.com you will need two seperate apps on Heroku. So you need to build an app that has only landing logic, and seperate all your dashboard logic into another app.
So have one Heroku build with just Landing and one Heroku build with your dashboard stuff.
Go to your Heroku app with the landing build and "add Domain" with the www. and follow steps above to update the CNAME in godaddy
This will host your landing
Now for Dashboard go to Heroku and Build your app with just dashboard logic.
Go into this App and "Add Domain" with the my.HappyNewYears.com and follow steps above to update the CNAME in godaddy.
There are also obvious other steps with your routing like changing all your dashboard urls to my.HappyNewYears.com and In your Google Oauth settings or whichever API you use it all needs to be aimed at my.HappyNewYears.com instead of your www.HappyNewYears.com
Hope this helps It can be confusing and alot of people starting out Coding will be getting domains from godaddy and using Heroku for servers just due the amount of content on the web from those two giants

Github Pages Domain name auto replaced by Personal Domain Name

Recently I noticed an issue in my Github pages. When I try to deploy a site on GitHub pages the default {github_username}.github.io got replaced with my personal domain name automatically. Is there any way to get the default GitHub pages domain name?
N.B. I bought my personal domain name from Namecheap using GitHub student developer pack Maybe that's why GitHub automatically replaces the default domain one
No, it is not automatic. It's because you have a CNAME file here. Delete this file & your problem should be solved. Also ensure that the custom domain field is empty in the GitHub pages setting (in your repo).

The website from custom domain is different from the website from host domain (stylesheet not updated in custom domain)

I built a personal website and hosted it on Heroku.
However, after recent update and push to Heroku, the website from the custom domain (http://www.kevinportfolio.com) is different from the website from the host domain (https://kevin-portfolio-page.herokuapp.com).
The first one is from host domain and is the correct display.
The second one is from custom domain and does not have a image and styling.
After some troubleshooting, I found out that the stylesheet.css for the custom domain is not updated as it is for the host domain. I assume it has something to do with the custom domain set up and DNS configuration. But I have no clue on how to resolve this issue.
This problem has persisted for more than 48 hours, the time suggested for the DNS to update.
It turns out that something is wrong with the chrome browser. I disabled the cache and reloaded the website and it worked.
The steps I took:
right-click the website and Inspect
In develop tools, go to the Network tab.
under the Network tab, check the 'disable cache' checkbox.
reload the website.
And the stylesheet is now updated.

Azure domain configuration

I have an APP that was awarded the gorunning.pt domain. It happens that when I call the gorunning.pt domain without the www everything works, when I add the www http://www.gorunning.pt/ I receive the page 404 application not found.
I've already set the DNS CNAME for the application of IP , also tried the url gorunning.azurewebsites.net defined by Azure , created a type A registration.
This is expected. Your DNS configuration is correct. However the Azure Web App's front-end doesn't recognize the www sub-domain as it is not mapped in the portal.
You will also have to map the www.gorunning.pt to your web app gorunning.azurewebsites.net in the Azure Portal. :)
From the dig web interface, it seems the domain has mapped to the Azure web app. However it shows 404 not found. As I know your custom domain maps to an empty web site, so the easiest way is deleting your existed web site then custom domain to the new web site again. If you still encounter the same issue, please submit a ticket via the following screenshot.

Website Redirecting to mysite.azurewebsites.net except while logged in as Admin

I recently moved my website from hostgator to azure websites but I want to keep the same domain. I've made all the correct DNS changes custom domain configuration in Azure but it redirects to mysite.azurewebsites.net once I click on a link in the site. The strange thing is this doesn't happen when I'm logged in as Admin.
Any ideas? Thanks

Resources