I was able to redirect the main-url.com but www.main-url.com does not resolve. Is there something special that needs to be done to accomplish this?
Yep, www is treated as a separate hostname from the apex domain, so the fact that main-url.com works doesn’t automatically make www.main-url.com resolve. Examples for my site below
Two things I’d suggest:
- Add a CNAME record for www.
- Then go into Replit app > Publishing tab > Domains sub-tab and add the www.main-url.com URL and it should resolve to ‘verified’ in a few mins and then work.
1 Like
I don’t believe a cname works with replit. Need to set both the root domain and the www as independent domains in the replit domain tool, and point the dns for both of them as instructed by the tool.
1 Like
Check this out: 301 redirect in Deployments - #2 by mark

