How to Upload Website Onto Google Domain Used Github
Web Hosting Published December 22nd, 2019
Hosting: Free. Domain Name: $12/twelvemonth Live Site: connorleech.info
Hosting: Free.
Domain Name: $12/year
Live Site: connorleech.info
Step 1: Buy your domain at Google Domains
Google Domains - Google
Search for and register a domain, become hosting, and build a site with Google Domains. The best of the cyberspace backed by…domains.google
In my instance I got "connorleech.info".
Footstep ii: Create a Static Website
Create a custom weblog theme with Hexo.js
Hexo.js is an awesome blogging platform. If you lot have ever used Ruby-red'south Jekyl it is like that but made of javascript! Information technology…m.dotdev.co
You tin do some really fancy stuff with this. I wrote a dissever mail service about how to Create a custom blog theme with Hexo.js. For the purposes of this tutorial we'll Keep Information technology Short and Simple (KISS) past deploying a "hello world" HTML site.
$ mkdir YOUR_GITHUB_USERNAME.github.io $ cd YOUR_GITHUB_USERNAME.github.io $ bear on alphabetize.html
And then make you're super crawly website. Paste the post-obit into alphabetize.html. If you are feeling adventurous yous could paste some of the sites from HTML5 UP. It'south your website and then I'll leave that up to you!
<!DOCTYPE html> <html> <head> <title>Connor's Website</title> </head> <torso> <h1>Hi Cyberspace!</h1> <p>This is a paragraph.</p> <script>alert('Random Javascript!');</script> </body> </html>
My github username is connor11528 so my github repo is connor11528.github.io.
Create a git repo and commit your code:
$ git init $ git add together -A $ git commit -1000 'initial commit' $ git condition On branch master nothing to commit, working tree clean
Step 3: Create the Repo on Github.com
Click the plus icon in top right then 'New Repository'
Public repos are free. Get out the README box unchecked. We can create that later.
Step four: Link your local code to the github repo
In one case the repo is created on github we need to connect information technology to our local files that we created in Step 2. Get the remote url:
Re-create that https link (you lot tin can utilise the button on the correct to re-create)Add that as the remote to your local git repo. It volition exist chosen origin and that links to github. You tin can have multiple remote and push to different place (like heroku) using git.
$ git remote add origin https://github.com/connor11528/connor11528.github.io.git $ git remote -v origin https://github.com/connor11528/connor11528.github.io.git (fetch) origin https://github.com/connor11528/connor11528.github.io.git (push) $ git push origin principal Counting objects: 58, done. Delta compression using upward to 4 threads. Compressing objects: 100% (57/57), done. Writing objects: 100% (58/58), 962.02 KiB | 0 bytes/s, washed. Total 58 (delta 2), reused 0 (delta 0) remote: Resolving deltas: 100% (ii/ii), done. To https://github.com/connor11528/connor11528.github.io.git * [new branch] master -> master
Then yous only take to expect a couple minutes and your site will be live! Thank y'all Github Pages. Head to YOUR_GITHUB_USERNAME.github.io to meet the live version of your website.
Footstep 5: Add CNAME file
$ affect CNAME
In my case my domain is connorleech.info then my CNAME file looks similar:
- connorleech.info
- www.connorleech.info
And then add the changes to git and push button them to your repo.
$ git add -A $ git commit -m 'add CNAME file' $ git push origin chief
Footstep half dozen: Configure DNS for Google Domain
Over at https://domains.google.com/registrar caput to the "Configure DNS" tab and ringlet to the "Custom resource records" section at the bottom of the folio.
Navigate to the Configure DNS tabYou demand to add 2 "@" blazon A records that point to the GitHub ips 192.30.252.153and 192.30.252.154 and ane "www" CNAME record that points to your USERNAME.github.io url
How to signal a domain on Google Domains to GitHub pages · Curtis Larson's Web log
Tutorial on pointing a domain on Google Domains to GitHub pageswww.curtismlarson.com
Thank y'all Curtis Larson (@QuackWare) for figuring this one out!
I was but able to add the one Github domain without an fault so information technology ended upward looking like this:
Add custom resource records to our configured domainFinally your site is now alive! Check it out. Mine is online at http://connorleech.info/ or connor11528.github.io will redirect to it!
Thanks for reading. You tin find me on twitter, linkedin and github where I share code, tutorials and job openings.
If yous enjoyed the tutorial delight requite it a recommend! Thank you once more
🚀 If you're a candidate on the job market feel free to create a profile on Employbl 🤝
Source: https://www.employbl.com/blog/launch-a-website-with-a-custom-url-using-github-pages-and-google-domains
0 Response to "How to Upload Website Onto Google Domain Used Github"
Post a Comment