Domain Name for This

Domain Name for This

Table of Contents

It has been a while now that this site is being served at https://atulyaraaj.codeberg.page

Now that I have bought a domain name I am planning to use a subdomain for this at https://atulya.thebigocommunity.org

This blog posts will showcase the steps that I took for using this domain name.

Codeberg pages on official Codeberg site


To use a custom domain, create a file .domains in your repository with the domain name you wish to use.

1. 
Then, add a DNS record for that domain:
CNAME [[branch.]repo.]user.codeberg.page.

2.
Or for apex domains where CNAME doesn't work:
ALIAS codeberg.page.
TXT [[branch.]repo.]user.codeberg.page

3.
If ALIAS isn't supported, use A & AAAA instead:
A 217.197.91.145
AAAA 2001:67c:1401:20f0::1
+ TXT as above 

I think I’ll go with first option:

Then, add a DNS record for that domain:
CNAME [[branch.]repo.]user.codeberg.page.

Step 1:

  1. Login into your hosting provider. Mine is Hostinger

alt text

Access your DNS - Network manager, then access you domain name to add records.

Step 2:

Creating a CNAME record.

CNAME:

CNAME records can be used to alias one name to another. CNAME stands for Canonical Name.

A common example is when you have both example.com and www.example.com pointing to the same application and hosted by the same server. To avoid maintaining two different records, it’s common to create:

An A record for example.com pointing to the server IP address
A CNAME record for www.example.com pointing to example.com

As a result, example.com points to the server IP address, and www.example.com points to the same address via example.com. If the IP address changes, you only need to update it in one place: just edit the A record for example.com, and www.example.com automatically inherits the changes. More

alt text

Step 3:

Creating a .domains file.

I found this example so from here

content inside .domains file

atulya.thebigocommunity.org
www.atulya.thebigocommunity.org
atulyaraaj.codeberg.page

Creating SSL for domain name:

I had a site deployed and it is redirecting to that only, LOL!

I just released that for domain atulya.thebigocommunity.org I’ll have to create SSL certificate.

Using Let’s crypt let’s create SSL cert for this domain.

My post “TLS Certificate” shows how to. { That blog does not help lol}

Now here is the blog by Denshi for Certificates.

root@atulya:~# certbot -d atulya.thebigocommunity.org --nginx

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Requesting a certificate for atulya.thebigocommunity.org

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/atulya.thebigocommunity.org/fullchain.pem
Key is saved at:         /etc/letsencrypt/live/atulya.thebigocommunity.org/privkey.pem
This certificate expires on 2024-12-03.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.

Deploying certificate
Could not install certificate

NEXT STEPS:
- The certificate was saved, but could not be installed (installer: nginx). After fixing the error shown below, try installing it again by running:
  certbot install --cert-name atulya.thebigocommunity.org

Could not automatically find a matching server block for atulya.thebigocommunity.org. Set the `server_name` directive to use the Nginx installer.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

To set up your custom domain (raja.bigo.org) to point to your Codeberg Pages site (raja.codeberg.page), you’ll need to follow these steps:

  1. Set up your Codeberg Pages repository:

    • Ensure you have a public repository on Codeberg with a branch named pages containing your website files.
  2. Add a .domains file:

    • In the pages branch of your Codeberg repository, create a file named .domains.
    • Add the following content to the file:
      raja.bigo.org
      
  3. Update your DNS settings: Since you’re using a subdomain (raja.bigo.org), you’ll need to add a CNAME record. Here’s what you need to do:

    • Log in to your domain registrar or DNS provider for bigo.org.
    • Find the DNS management section.
    • Add a new CNAME record with the following details:
      • Host/Name: raja
      • Value/Target: raja.codeberg.page.

    Note: Make sure to include the trailing dot (.) at the end of raja.codeberg.page.

  4. Wait for DNS propagation:

    • DNS changes can take up to 48 hours to propagate, but often it’s much quicker (15-30 minutes).
  5. Test your setup:

    • After the DNS changes have propagated, visit https://raja.bigo.org in your browser. It should now show your Codeberg Pages website.

Additional notes:

  • The CNAME you previously set up (raja.bigo.org pointing to bigo.org) should be replaced with the new CNAME pointing to raja.codeberg.page.
  • If you’re using HTTPS, Codeberg Pages should automatically issue an SSL certificate for your custom domain. This process might take a little time after the DNS changes have propagated.
  • If you encounter any issues, double-check your DNS settings and the .domains file in your Codeberg repository.

Remember that DNS changes can take some time to propagate globally. If it doesn’t work immediately, wait a bit and try again later. If you continue to have issues, you may need to contact Codeberg support or your domain registrar for further assistance.

This I tried for simple certificate

sudo certbot certonly --standalone -d raja.bigo.org
Tags :