Appearance
Setting Up Website DNS
Services used
DreamHost- used as the domain registar
- also handles domain emails
Heroku- hosts the websites and apis
Cloudflare- handles the DNS and SSL
Set Up Steps
- Domain needs to be purchased on DreamHost
- Heroku frontend app needs to be deployed
- add both the www and non-www domain names
- configure ssl for certificates to be auto managed
- Add the domain to cloudflare
- can do much of the onboard automatically
- DNS records should contain 2
CNAMESand 3NSrecordsNSrecords should match the DreamHostNSrecords- CNAMES are as follows, content values come from Heroku
Type Name Content Proxy Status TTL CNAME @ name.herokudns.com Orange Cloud Auto CNAME www name.herokudns.com Orange Cloud Auto
- DreamHost domain config needs to be as follows
- DNS Only
- DreamHost
NSrecords - custom record that is
Name Type Value www CNAME name.herokudns.com - CNAME will be for the www domain on Heroku
- will have custom Nameservers from cloudflare
- Update Nameservers from Cloudflare on DreamHost
- Turn off proxies (orange cloud) for both domains then turn off "Always Use HTTPS" and "Automatic HTTPS Rewrites" in Cloudflare SSL Edge Certificates
- Refresh ACM Status in Heroku
- should end up with an ACM status of "OK" for both domains
- if not, try removing and readding both domains
heroku domains:remove domain.com --app heroku-appheroku domains:add domain.com --app heroku-app
- if not, try removing and readding both domains
- should end up with an ACM status of "OK" for both domains
- Turn proxies and HTTPS settings back on in Cloudflare
- Test both domain types in an incognito window
- domains should route correctly and be secure - setup is complete 🎉
