I have a site that uses 3 languages. The thing is only one of those languages has a specific page. (the client wants each language to be used for each country that he sells to)

I could create a metatag in the header that would ignore the full page, but that would disable indexing that page in all languages.

Is there a way to disable indexing in a page only in specific languages? (using the WorkContext.WorkingLanguage.Id, i.e.)

Thank you.

TZ

有帮助吗?

解决方案

Create a HTML helper method that resolves the IWorkContext and checks the language locale for your languages to ignore, then returns a string with the noindex meta tag. Then, call that in your /Shared/_Root.Head.cshtml view

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top