- Can use this boilerplate to modify: http://www.initializr.com/
- Make all your subpages and make sure to link them
- Check your index.html works
- Go to http://www.godaddy.com
- Login to your account or create one
- Search for a domain and pay for it
- On godaddy click on your name on the topright
- Click on manage domains
- Click on the website domain you want to change
- Go to the second tab, which is the DNS Zone file
- Hold other steps till you setup the google cloud storage
- go to https://analytics.google.com
- in the Admin tab, click on add a property
- add property corresponding to your site: www.your-domain-name.com
- take the website tracking script and make sure to update all your static html pages with this tracking script
- It should look something like this:
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-12346789-1', 'auto');
ga('send', 'pageview');
</script>
- Go to https://console.cloud.google.com
- Login and setup your account
- Click on the top left and scroll down till you hit Storage
- Create a bucket called www.your-domain-name.com
- At this point, you will have to verify that you-domain-name.com belongs to you.
- Go to the following site
- https://www.google.com/webmasters/verification/home?hl=en
- Click on add a property
- type out the url and click continue
- You should be able to do this simply enough if you are on godaddy
- For other DNS hosts, you will be asked to upload some files to your domain.
- Once verified continue with the next steps
- Upload all your files to the bucket
- Make sure all folders etc are uploaded also
- Go back to the main page. On the right side of the bucket you created click on options
- Edit website config
- Add index.html and 404.html
- Go inside bucket. Click on select all files.
- Click Share Publicly on the top list of options
- Do this for all folders inside
- Go into DNS Zone File for your domain
- Click add record
- Create a CNAME record pointing to c.storage.googleapis.com
- Go to the setting page
- Add a forwarding rule
- Choose a 301 forwarding without masks to www.your-domain-name.com
- You are done
- Add forwarding rules form different domains you have bought into the main DNS host ex: my-other-domainname.com forwarding to www.your-domain-name.com.
Check Now Should be all done!