Overview
The portfolio is configured to use the custom domainaviv.sh. This guide will help you:
- Configure DNS settings with your domain registrar
- Set up the CNAME file in your repository
- Enable HTTPS/SSL for secure connections
- Update Astro configuration for your domain
CNAME File Configuration
The repository includes aCNAME file that tells GitHub Pages which custom domain to use.
Verify CNAME file exists
The CNAME file should be located at the root of your repository:
CNAME
The CNAME file should contain only your domain name, without
https:// or www.Update for your domain
If you’re using a different domain, update the CNAME file:Or for a subdomain:
CNAME
CNAME
Astro Configuration
Update theastro.config.mjs file to match your custom domain:
astro.config.mjs
DNS Configuration
Configure your DNS settings with your domain registrar to point to GitHub Pages.For Apex Domain (e.g., aviv.sh)
Add A records
Add the following A records to your DNS configuration:
| Type | Name | Value |
|---|---|---|
| A | @ | 185.199.108.153 |
| A | @ | 185.199.109.153 |
| A | @ | 185.199.110.153 |
| A | @ | 185.199.111.153 |
For Subdomain (e.g., www.aviv.sh or portfolio.yourdomain.com)
DNS changes can take up to 24-48 hours to propagate, but typically complete within a few hours.
GitHub Pages Configuration
Configure custom domain
- Under Custom domain, enter your domain name (e.g.,
aviv.sh) - Click Save
- GitHub will verify your DNS configuration
Verifying Your Setup
After configuring everything, verify your setup:Test your domain
Visit your domain in a browser:
https://yourdomain.com- Verify it loads correctly
- Check that HTTPS is working (look for the padlock icon)
Troubleshooting
Domain Not Resolving
Check DNS records:- Verify A/AAAA or CNAME records are correctly configured
- Use
dig yourdomain.comornslookup yourdomain.comto verify - Wait for DNS propagation (up to 48 hours)
- Typo in domain name in CNAME file
- Incorrect DNS records
- DNS not yet propagated
SSL Certificate Not Provisioning
- Verify DNS: Ensure DNS is correctly configured and propagated
- Check CNAME file: Verify the CNAME file contains the correct domain
- Remove and re-add: Try removing the custom domain in GitHub Pages settings and adding it again
- Wait: Sometimes you just need to wait a bit longer
Site Shows 404 Error
- Verify deployment: Check that the GitHub Actions workflow completed successfully
- Check CNAME file: Ensure it’s in the repository root and contains only the domain name
- Clear DNS cache:
- Clear browser cache: Hard refresh your browser (Ctrl+Shift+R or Cmd+Shift+R)
WWW vs Non-WWW
To redirect www to non-www (or vice versa): Option 1: Both A records and CNAME- Set up A records for apex domain (
@) - Add CNAME record for
wwwpointing to apex domain - In GitHub Pages settings, use your preferred version
- Some DNS providers offer URL forwarding/redirect features
- Configure
wwwto redirect to non-www (or vice versa)
GitHub Pages will automatically redirect between www and non-www versions based on your CNAME configuration.
Domain Registrars
Here are quick links to DNS settings for popular registrars:- Namecheap: Advanced DNS settings
- GoDaddy: DNS Management
- Cloudflare: DNS settings (with free SSL and CDN)
- Google Domains: DNS settings
- Porkbun: DNS settings
If using Cloudflare, ensure the DNS record is set to “DNS only” (gray cloud) rather than “Proxied” (orange cloud) for GitHub Pages to work correctly, or configure Cloudflare Pages instead.
