# 301 redirect in Deployments

**URL:** <https://replit.discourse.group/t/301-redirect-in-deployments/4104>\
**Category:** Feature Requests\
**Tags:** deployments\
**Created:** [March 18, 2025, 9:47pm UTC](https://replit.discourse.group/t/301-redirect-in-deployments/4104 "2025-03-18T21:47:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mark](https://yyz2.discourse-cdn.com/flex010/user_avatar/replit.discourse.group/mark/32/196_2.png) [@mark](https://replit.discourse.group/u/mark)\
**Post date:** [March 18, 2025, 9:47pm UTC](https://replit.discourse.group/t/301-redirect-in-deployments/4104/1 "2025-03-18T21:47:49Z")

</div>

Currently you cannot set a 301 redirect in Deployments. For maximum SEO a 301 redirect is beneficial. It’d be cool to see 301 (and 302 too if possible) Redirects supported in Deployments.

@matt-replit has a [great doc on custom domains](https://docs.replit.com/cloud-services/deployments/custom-domains) and does talk about adding www and non-www, however, this creates a ‘duplicate’ content scenario in the eyes of Google etc.

---

<div class="post-metadata">

**Author:** ![mark](https://yyz2.discourse-cdn.com/flex010/user_avatar/replit.discourse.group/mark/32/196_2.png) [@mark](https://replit.discourse.group/u/mark)\
**Post date:** [May 8, 2025, 4:14pm UTC](https://replit.discourse.group/t/301-redirect-in-deployments/4104/2 "2025-05-08T16:14:36Z")

</div>

Workaround for anyone needing www 301 to non-www. Use Cloudflare, proxy the www only if you prefer the non-www. Set a CNAME to www and point to root domain. Then go to Rules and use the built in www to non-www redirect rule [Redirect from WWW to root · Cloudflare Rules docs](https://developers.cloudflare.com/rules/url-forwarding/examples/redirect-www-to-root/)
