How to use request.host object in robots.txt without global objects?

It’s great that Shopify added ability to edit robots.txt via use of robots.txt.liquid

Unfortunately it seems like robots.txt.liquid does not support global objects

Specifically request object is not available

We are using multiple domains and languages in our store and we want to be able to make different robots.txt

Request.host would allow us to set this differences in robots.txt.liquid but it is not propagated to the template

How other experts solve this problem?

Would be happy to hear if anyone has a workaround for this

Would be even more happy if Shopify would add request object support to their roadmap

Thanks

Nick

3 Likes