Rewrite to other owned service results in 301

Is it possible to set a rewrite rule in one Render service in such a manner that it will serve content from second Render service without redirecting to it with 301?

My use case is that front-end is on domain foo (Render service #1), while backend is on sub-domain (Render service #2), and I want crawlers that come at to be served content from

I want to try with rewrite first, because serving both frontend and backend from one domain is going to require far more complex setup.

Render supports rewrite rules. You can use these to serve content from your backend without redirecting the client. Does this solve your use case?

I cannot make Render rewrite rules fly for me and that’s the reason why I posted my question.

I got rule /crawlers/:foo → and it returns 301 with location

Backend service is a Django app. I tested it locally, as well as checked Render logs, and I see no reason for 301 apart from Render (load balancer?).

Of course, due to my mistake the rule was set to redirect instead of rewrite.

For future reference, just triple check it!

1 Like