To set up a custom domain (stickersgallito.com) purchased from Porkbun for your app (stickers-gallito-project-0c16758d6fa2.herokuapp.com), you would typically follow these steps:
Add Domain to Heroku App:First, add your custom domain to your app:bashCopy codeheroku domains:add www.stickersgallito.comThis command should return a DNS target (e.g.,www.stickersgallito.com.herokudns.com), which you'll need for the next steps.
Login to Porkbun:Go to the Porkbun website and log in to your account.
Manage Domain:Locatestickersgallito.comin your domain list and click on the "Manage" option for this domain.
Edit DNS Records:In the domain management section, navigate to the "DNS Records" section. Here, you'll add or modify the DNS records to point to your app.CNAME Record for www: Set up a CNAME record for thewwwsubdomain:Type:CNAMEHost:wwwAnswer: The DNS target provided by (e.g.,www.stickersgallito.com.herokudns.com).Optionally, if you want to redirect the apex domain (e.g.,stickersgallito.comwithout the 'www') to the www subdomain, you can set up a URL redirect on Porkbun:URL Redirect for the Apex Domain: Create a URL redirect fromstickersgallito.comtowww.stickersgallito.com.
CNAME Record for www: Set up a CNAME record for thewwwsubdomain:Type:CNAMEHost:wwwAnswer: The DNS target provided by (e.g.,www.stickersgallito.com.herokudns.com).
Type:CNAME
Host:www
Answer: The DNS target provided by (e.g.,www.stickersgallito.com.herokudns.com).
URL Redirect for the Apex Domain: Create a URL redirect fromstickersgallito.comtowww.stickersgallito.com.
Wait for DNS Propagation:Changes to DNS records can take some time to propagate across the internet. This could be anywhere from a few minutes to 48 hours. Until then, your domain might not immediately point to your app.
SSL:Ensure you have SSL set up for your app, especially if you're planning on using HTTPS. Heroku's Automated Certificate Management (ACM) can provide free SSL certificates for apps running on paid dynos.To enable ACM:bashCopy codeheroku certs:auto:enableOnce done, you can verify the status with:bashCopy codeheroku certs:auto
Test Your Domain:After DNS propagation, visitingwww.stickersgallito.comshould take you to your app. Ensure that everything is working as expected.
Add Domain to Heroku App:
First, add your custom domain to your app:
────────────────────────────────────────────────────────────────────
bashCopy codeheroku domains:add www.stickersgallito.com
This command should return a DNS target (e.g.,www.stickersgallito.com.herokudns.com), which you'll need for the next steps.
Login to Porkbun:
Go to the Porkbun website and log in to your account.
Manage Domain:
Locatestickersgallito.comin your domain list and click on the "Manage" option for this domain.
Edit DNS Records:
In the domain management section, navigate to the "DNS Records" section. Here, you'll add or modify the DNS records to point to your app.
CNAME Record for www: Set up a CNAME record for thewwwsubdomain:Type:CNAMEHost:wwwAnswer: The DNS target provided by (e.g.,www.stickersgallito.com.herokudns.com).
Type:CNAME
Host:www
Answer: The DNS target provided by (e.g.,www.stickersgallito.com.herokudns.com).
CNAME Record for www: Set up a CNAME record for thewwwsubdomain:
Type:CNAME
Host:www
Answer: The DNS target provided by (e.g.,www.stickersgallito.com.herokudns.com).
Type:CNAME
Host:www
Answer: The DNS target provided by (e.g.,www.stickersgallito.com.herokudns.com).
Optionally, if you want to redirect the apex domain (e.g.,stickersgallito.comwithout the 'www') to the www subdomain, you can set up a URL redirect on Porkbun:
URL Redirect for the Apex Domain: Create a URL redirect fromstickersgallito.comtowww.stickersgallito.com.
URL Redirect for the Apex Domain: Create a URL redirect fromstickersgallito.comtowww.stickersgallito.com.
Wait for DNS Propagation:
Changes to DNS records can take some time to propagate across the internet. This could be anywhere from a few minutes to 48 hours. Until then, your domain might not immediately point to your app.
SSL:
Ensure you have SSL set up for your app, especially if you're planning on using HTTPS. Heroku's Automated Certificate Management (ACM) can provide free SSL certificates for apps running on paid dynos.
To enable ACM:
────────────────────────────────────────────────────────────────────
bashCopy codeheroku certs:auto:enable
Once done, you can verify the status with:
────────────────────────────────────────────────────────────────────
bashCopy codeheroku certs:auto
Test Your Domain:
After DNS propagation, visitingwww.stickersgallito.comshould take you to your app. Ensure that everything is working as expected.
Note: When working with DNS settings, always be cautious. Incorrect settings can make your domain inaccessible. Always double-check your configurations and ensure that you're not deleting or overwriting any important pre-existing records.