Site setup with routing / reverse proxy

I have two static sites that ideally i would like to host on Pages (not a hard requirement) which essentially breaks down to a main site, and a docs site. because we want crawlers to index them as one site we’d like the docs site to show up under domain.com/docs rather than something like docs.domain.com

the docs site is all under /docs so from a backend standpoint if they go to domain.com/docs/some_info i’d like that to render mydocs.pages.dev/docs/some_info vs something like domain.com/product/info which would render mainsite.pages.dev/product/info

I hope this makes sense. wondering how i would go about setting this up on Cloudflare.

Thanks

Hello,

Did you resolve this I have the same requirement. Normally I would use nginx for this but if the site is on pages I cannot work out how to proxy a url to another subdomain.
Thanks

I have not found a solution to this. I was looking to move a website from another hosting provider, that does use nginx to do this, to pages if i could, but i’ve been unable to find a way to make this work.

I guess i’d just move it to a sub domain however from my understanding that would mess up SEO since the docs.domain.com would be considered different from just domain.com but im not all that great with SEO

I found this post. It seems you can use a worker if you do not have the enterprise plan…
Using Cloudflare as a reverse proxy - Docs - PostHog and this one
How to setup a reverse proxy via Cloudflare?
HTH

very cool, it looks like that will work, just need to setup a test, but based on what im reading there, it should work fine.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.