NR Hosting Ltd

What is the default html file name to deploy on GitHub?

What is the default html file name to deploy on GitHub?
Default HTML File Name – GitHub is not only a great place to store and share your code with others but they also offer free web hosting of your HTML, CSS, and JavaScript projects!In this article I’ll show you how to get setup in order to publish and share your own static HTML website on GitHub using the GitHub Desktop app!

Steps for Hosting a Website on GitHub – Default HTML File Name

Create a GitHub account on github.com.Download either GitHub for Mac or GitHub for Windows, depending on your operating system. Open the app and log in using the account you just created.(On Mac): After you login, click advanced and make sure that your name and email are correct. Then, click “Install Command Line Tools”, just in case you want to start using the command line later in life.Create a new repository in your GitHub application. Name it your-username.github.io. The name is very important. Note the folder that GitHub is saving the repository to. Make sure the “Push to GitHub?” box is checked.Move your website’s files into the folder that GitHub just created when you made the repository. IMPORTANT: Your homepage HTML file must be called “index.html”, and it must exist in the top-level directory.Back in the GitHub application, you should see your files in the left column. Make sure they are all checked. If so, enter a message in the text box called “commit summary”, something like “initial commit.” Then, click the commit button.Click the “Publish repo” button in the top right corner.Give it about 10 minutes, then check your-username.github.io. Your website should be there!

Using a custom domain name

You can just leave your website at that address (it’ll give you some serious street cred in the developer world), but if you have a custom domain you would like to use, it is very simple to make GitHub redirect your page.Log in to your domain registrar and find where to change your host records. If you don’t know, you can usually Google “(domain registrar) change host records”, and your registrar will have an explainer telling you how to do it.Change your domain’s A Record to 204.232.175.78. This is GitHub’s IP address, which allows GitHub to resolve your URL and serve the correct files.In your website’s directory folder on your computer, create a file called “CNAME”. On the first line, type your domain name. Save the file.In your GitHub application, you should see the file in the left column. Make sure it is checked and enter your commit message. Have it say something like “Adding CNAME file.”Click “Sync branches.”It can take as long as 48 hours for your domain to resolve to your GitHub page. However, it is usually pretty quick, so check back in an hour or so.

Leave a Reply

Your email address will not be published. Required fields are marked *