© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developers•2y ago•
3 replies
arcorun

Need help with redirects.

This question is in relation to Cloudflare pages, probably using the Github integration.

If I wanted visitors to example.com + www.example.com permanently redirected to a subpath such as example.com/sub what would be the best way to do it?

I have found the 2 dev links below but I'm not sure what approach to take.

(1) https://developers.cloudflare.com/pages/configuration/redirects/

(2)
https://developers.cloudflare.com/rules/url-forwarding/
Cloudflare Docs
Redirects · Cloudflare Pages docs
To use redirects on Cloudflare Pages, declare your redirects in a plain text file called _redirects without a file extension, in the output folder of …
Redirects · Cloudflare Pages docs
Cloudflare Docs
Redirects · Cloudflare Rules docs
URL forwarding, also known as URL redirection, navigates the user from a source URL to a target URL with a specific HTTP status code.
Redirects · Cloudflare Rules docs
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

help on _redirects
Cloudflare DevelopersCDCloudflare Developers / pages-help
3y ago
Issue with _redirects
Cloudflare DevelopersCDCloudflare Developers / pages-help
14mo ago
_redirects redirects my proxy rule
Cloudflare DevelopersCDCloudflare Developers / pages-help
11mo ago
Need help with a mobile help
Cloudflare DevelopersCDCloudflare Developers / pages-help
3y ago