Closed criation closed 2 months ago
Currently, this module does not support configuration per domain, but you can dynamically generate your robot.txt based on the domain.
@criation Did you solve your problem? Maybe you can acheive what you want with env.
robots:
process.env.STAGE === "production"
? {
rules: [
{
UserAgent: "*",
Allow: "/",
Disallow: "/admin",
},
],
}
: {
rules: {
UserAgent: "*",
Disallow: "/",
},
},
I just set STAGE but you can set whatever you want as variable in env file. And make your code works conditionally based on domians. I am sure you can acheive what you want in this way.
I do have two domains, lets say
staging.example.com exmaple.com
now i want to have specific robots setting for each domain. It'd be nice to realize this by config like this:
is something like this already available?