denoland / deploy_feedback

For reporting issues with Deno Deploy
https://deno.com/deploy
74 stars 5 forks source link

Provide www redirect #244

Open rossholdway opened 2 years ago

rossholdway commented 2 years ago

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

alexbezhan commented 2 years ago

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

satyarohith commented 2 years ago

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

CleanShot 2022-08-22 at 15 10 01@2x
alexbezhan commented 2 years ago

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