SEO Question: How to not to expose a 'Thing' and expose others in Sitemap

My app allows users to create a listing called a ‘property’ in my database. I want Google to crawl their properties but some times a user might pause their property so that it doesn’t show up in the search results of my app. When a ‘property’ is paused a field in the database called ‘isPaused’ is marked true and the search won’t count it.

If I expose ‘property’ on the sitemap Google won’t take into account the ‘isPaused’ field and will index those properties. I need advice, what would you do?

You can add a no-index tag conditionally to the page, based on whether the page’s thing is paused or not.

Obviously that won’t stop it being indexed by Google until they next crawl the page, so you can’t rely on that for hiding content from users - but it will tinge it from their index next time it’s crawled.

That’s interesting. Do you know if that can be done in a workflow?

Technically, you can inject a noindex tag into the page with some JavaScript in a workflow, but whether or not Google (and other crawlers) would pick it up would be doubtful.

It really needs to go directly into the page html header…

You can use a conditional statement, formatted as text, in the page html header to do this correctly.

Thanks @adamhholmes for your help, I really like this idea. I can’t find any way to add a conditional to the HTML header, do you think this would work? Set a conditional state when page ‘isPaused’ = yes to META NAME=“robots” CONTENT=“noindex,nofollow” and a conditional state when isPaused = NO to [nothing]. Then in the HTML header use that conditional state as dynamic data. Would that work? Is there any easier way?

No, you can’t reference page elements or custom states in the html header…

Is there any easier way?

Yes… as I said you just need to use a conditional statement formatted as text…

i.e.

Current Page Property's Paused is yes: format as text

For yes enter:

<meta name="robots" content="noindex">

For no, don’t enter anything.

This topic was automatically closed after 70 days. New replies are no longer allowed.