Part 1: Theory
1. What is DNS (Domain Name System)?
-
Definition: DNS works like the phonebook of the internet. It translates human-friendly web addresses into numbers that computers understand.
-
IP Routing: Computers connect to each other using numerical addresses called IP addresses (e.g.,
216.239.32.21). DNS routes users automatically so they do not need to memorize these numbers. -
Real-Life Example:
- Phonebook: Searching for "Sujan" gives you
9800000000. - DNS: Searching for
mybrand.com.npgives the computer IP address216.239.32.21.
- Phonebook: Searching for "Sujan" gives you
2. Main DNS Record Types
-
Nameservers (NS): Tell the internet which server manages your DNS records.
-
A Record (Address Record): Connects a domain directly to a numerical web server IP address.
- Example: Points
mybrand.com.np\rightarrow216.239.32.21.
- Example: Points
-
CNAME Record (Canonical Name): Connects a domain or sub-domain to another domain name instead of an IP address.
- Example: Points
[www.mybrand.com](https://www.mybrand.com).np\rightarrowghs.googlehosted.com.
- Example: Points
3. What is a CDN (Content Delivery Network)?
-
Definition: A global network of servers that stores copies of your website content to deliver it faster to users.
-
Why Use a CDN:
- Speed: Loads your website quickly regardless of visitor location.
- Security: Protects your website from cyber attacks (such as DDoS attacks).
- Reliability: Keeps your site running even during high traffic.
-
Example: If your website is stored on a server far away, a CDN like Cloudflare serves the cached content from a local server nearby.
4. Web Security: SSL & HTTPS
-
HTTPS: Secure version of HTTP that encrypts information sent between the user's browser and the server.
-
SSL Certificate: A digital key that activates HTTPS, showing a padlock icon in the browser address bar.
-
Why It Matters:
- Protects passwords, customer data, and form details.
- Google ranks secure HTTPS sites higher than non-secure HTTP sites.
-
Example:
[http://site.com](http://site.com)shows "Not Secure", while[https://site.com](https://site.com)shows a secure lock icon.
Part 2: Practical
Step 1: Add Domain to Cloudflare
- Go to dash.cloudflare.com and log in or create a free account.
- Click Add a site in the top right.
- Enter your domain name (e.g.,
mybrand.com.np). - Select the Free plan tier and click Continue.
- Cloudflare will scan your existing DNS records; click Continue to confirm.
- Copy the two custom Cloudflare Nameservers shown on the screen (e.g.,
ns1.cloudflare.comandns2.cloudflare.com).
Step 2: Update Nameservers at register.com.np
- Log in to your account at register.com.np.
- Go to Active Domain and select your approved
.com.npdomain name. - Click Edit DNS / Change Nameservers.
- Remove the default nameservers (e.g.,
np-ns.mercantile.com.np). - Enter the two Cloudflare Nameservers copied in Step 1.
- Save your changes and wait for DNS propagation (can take anywhere from 15 minutes to a few hours).
Step 3: Configure Blogger Custom Domain & DNS Records
1. Get Google Verification Details from Blogger
- Open Blogger.com \rightarrow Settings \rightarrow Publishing.
- Click Custom domain.
- Type your full domain with
www(e.g.,[www.mybrand.com](https://www.mybrand.com).np) and click Save. - An error message will display showing two CNAME records generated by Google:
- CNAME 1: Name:
www| Target:ghs.googlehosted.com - CNAME 2: Name:
[random code]| Target:[random code.googlehosted.com]
- CNAME 1: Name:
2. Add Records into Cloudflare DNS
-
Open your Cloudflare dashboard and go to DNS \rightarrow Records.
-
Add the 2 CNAME Records:
- Click Add record \rightarrow Type: CNAME \rightarrow Name:
www\rightarrow Target:ghs.googlehosted.com\rightarrow Proxy status: DNS only \rightarrow Save. - Click Add record \rightarrow Type: CNAME \rightarrow Name:
[random code]\rightarrow Target:[random code.googlehosted.com]\rightarrow Proxy status: DNS only \rightarrow Save.
- Click Add record \rightarrow Type: CNAME \rightarrow Name:
-
Add the 4 Google A Records (points your apex domain
mybrand.com.npto Google IPs):- Add A Record: Name:
@| IPv4 address:216.239.32.21| Proxy: Proxied - Add A Record: Name:
@| IPv4 address:216.239.34.21| Proxy: Proxied - Add A Record: Name:
@| IPv4 address:216.239.36.21| Proxy: Proxied - Add A Record: Name:
@| IPv4 address:216.239.38.21| Proxy: Proxied
- Add A Record: Name:
3. Complete Setup in Blogger
- Return to Blogger Settings \rightarrow Custom domain and click Save.
- Enable the toggle for Redirect domain (redirects
mybrand.com.npto[www.mybrand.com](https://www.mybrand.com).np).
Step 4: Enable Security & HTTPS in Cloudflare (10 Mins)
- In Cloudflare, navigate to SSL/TLS in the left menu.
- Under Overview, set the encryption mode to Flexible or Full.
- Go to SSL/TLS \rightarrow Edge Certificates.
- Turn ON the toggle for Always Use HTTPS (automatically shifts non-secure
httprequests tohttps). - Back in Blogger Settings \rightarrow HTTPS, enable HTTPS availability and HTTPS redirect.
- Open a browser and type
[www.mybrand.com](https://www.mybrand.com).npto confirm your domain shows a green padlock icon!
Comments
Post a Comment