How to build a website and host it free

Othmaniamir
2 min readMay 18, 2021

--

Ready to get started? Build your own website with custom domain name for your GitHub Pages.

  1. Configuring a GitHub Pages site

A)Create a repository

Create a new repository

Head over to GitHub and create a new public repository named username.github.io, where username is your username on GitHub.

Note: If the first part of the repository doesn’t exactly match your username, it won’t work, so make sure to get it right.

B)Clone the repository

clone the repository in your machine

Go to the folder where you want to store your project, and clone the new repository in your computer.

C)write the website source code

website source code

Most web pages follow a general outline. This is usually a header and navigation bar at the top, main content in the middle, and a footer at the bottom.

D)Push it

push the work to GitHub

Add, commit, and push your changes.

2)Configuring a custom domain for a GitHub Pages site

a)configuring GitHub repository

GitHub pages

>settings (click)

>pages (cliick)

>Custom domain (write your domain name)

>Enforce HTTPS (check)

b)configuring DNS provider (domain name service)

OVH in my case

dig ElAmirrgithubio nostats +nocomments +nocmd

> run dig ElAmirrgithubio nostats +nocomments +nocmd command

>coppy the four IP’s adresse

mapping GitHub Pages with the DNS provider

>DNS zone (click)

>add an entry (past IP addres)

Thank you for reading my article and feel free to ask any questions in the comment section.

--

--

Othmaniamir
Othmaniamir

No responses yet