deploy_feedback icon indicating copy to clipboard operation
deploy_feedback copied to clipboard

Provide www redirect

Open rossholdway opened this issue 1 year ago • 3 comments

Hello,

It'd be nice if Deno Deploy had some kind or support / documentation / feature (like Netlify) for www redirects when adding a custom domain.

For example, configuring a site with a custom domain, I'd like to be able to 301 redirect non-www requests to www.

https://example.com > https://www.example.com

rossholdway avatar Jul 17 '22 17:07 rossholdway

I second that. Very much needed for regular SEO optimisation.

alexbezhan avatar Aug 22 '22 10:08 alexbezhan

Work around for now: add www.domain.com to domains in addition to domain.com.

CleanShot 2022-08-22 at 15 10 01@2x

satyarohith avatar Aug 22 '22 11:08 satyarohith

Update. I've done it this by configuring both domains and then doing the redirect from naked domain to www domain. In Deno dashboard: image

In domain provider(my is Namecheap): image

In index.tsx: image

alexbezhan avatar Aug 22 '22 15:08 alexbezhan