Answer the question
In order to leave comments, you need to log in
How to close a blog from indexing for regional subdomains in modx?
Made a blog for a commercial site with regional subdomains. Regional subdomains are configured using the SEODomains plugin. You need to close the blog from indexing on all subdomains either through robots.txt, or insert the noindex tag for the blog pages of subdomains. There is a solution? Tell me pliz
Answer the question
In order to leave comments, you need to log in
Solved by inserting noindex tag via js. Solution:
if (window.location.hostname.length > "seo-dranitsyn.ru".length) {
let meta = document.createElement('meta');
meta.name="robots";
meta.content="noindex, nofollow";
document.head.appendChild(meta);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question