Moz Q&A is closed.
After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.
Dynamically Inserting Noindex With Javascript
- 
					
					
					
					
 Hello, I have a broken plugin creating hundreds of WP-Content directory pages being indexed by Google. I can not access the source code of these pages to add a noindex to them. The page URL's all have the plugin name within them. In order to resolve the issue, I wrote a solution with javascript to dynamically add in a noindex tag to any URL containing the plugin name. Would this noindex be respected by Google and is there a way to immediately check that it is respected? Currently, I can not delete the plugin due to issues with it's php. If you would like to view the code: https://codepen.io/trodrick/pen/Gwwaej?editors=0010 Thanks! 
- 
					
					
					
					
 Perfect! Happy to help! 
- 
					
					
					
					
 It seemed to work. Hopefully the noindex is respected, thank you! 
- 
					
					
					
					
 You can! Via https://support.google.com/webmasters/answer/1663419?hl=en - If you choose to hide a directory, then any file or directory starting with the prefix you supply will be blocked. So if you enter /folder, then /folder/somefile, foldername/somefile, and /folder.html will all be blocked.
- To hide an entire site, leave the path empty.
 
- 
					
					
					
					
 It looks like it is active. Thanks, John! Can you no-index an entire directory in GSC? I thought it was only per URL. 
- 
					
					
					
					
 Hey there! Do you have a link to a page where it's implemented live? As long as you have the no-index, no follow in there, you should be okay. Other things you can do: 1. Use robots.txt to hide the directory of pages that the plugin is outputting 2. Sign into the Google Search Console and no-index the same directory I would do 1 and 2 to help speed up things once the no-index, no-follow tag is in place. 
Browse Questions
Explore more categories
- 
		
		Moz ToolsChat with the community about the Moz tools. 
- 
		
		SEO TacticsDiscuss the SEO process with fellow marketers 
- 
		
		CommunityDiscuss industry events, jobs, and news! 
- 
		
		Digital MarketingChat about tactics outside of SEO 
- 
		
		Research & TrendsDive into research and trends in the search industry. 
- 
		
		SupportConnect on product support and feature requests. 
Related Questions
- 
		
		
		
		
		
		Google has deindexed a page it thinks is set to 'noindex', but is in fact still set to 'index'
 A page on our WordPress powered website has had an error message thrown up in GSC to say it is included in the sitemap but set to 'noindex'. The page has also been removed from Google's search results. Page is https://www.onlinemortgageadvisor.co.uk/bad-credit-mortgages/how-to-get-a-mortgage-with-bad-credit/ Looking at the page code, plus using Screaming Frog and Ahrefs crawlers, the page is very clearly still set to 'index'. The SEO plugin we use has not been changed to 'noindex' the page. I have asked for it to be reindexed via GSC but I'm concerned why Google thinks this page was asked to be noindexed. Can anyone help with this one? Has anyone seen this before, been hit with this recently, got any advice...? Technical SEO | | d.bird0
- 
		
		
		
		
		
		"Noindex, follow" for thin pages?
 Hey there Mozzers, I have a question regarding Thin pages. Unfortunately, we have Thin pages, almost empty to be honest. I have the idea to ask the dev team to do "noindex, follow" on these pages. What do you think? Has someone faced this situation before? Will appreciate your input! Technical SEO | | Europarl_SEO_Team0
- 
		
		
		
		
		
		Include or exclude noindex urls in sitemap?
 We just added tags to our pages with thin content. Should we include or exclude those urls from our sitemap.xml file? I've read conflicting recommendations. Technical SEO | | vcj0
- 
		
		
		
		
		
		Static or dynamic category pages for seo
 Hi, I'm developing an accommodation site with a limited number of properties in 8 categories. I had been looking at making the properties blog posts and then using category function to show lists but its going to require a lot of customisation and I have seo concerns about the dynamic content as the category page is crucial. As I don't have a lot to add and listings will remain the same my latest thought was to create all as pages. However if I create a page with a list of 12 properties on a category page is there anyway of adding some sorting criteria to that page (would be 7 options - swimming pool, near beach, on site creche, budget, mid-range, luxury) Thanks for any tips Neil Technical SEO | | neilhenderson0
- 
		
		
		
		
		
		Best way to noindex long dynamic urls?
 I just got a Mozcrawl back and see lots of errors for overly dynamic urls. The site is a villa rental site that gives users the ability to search by bedroom, amenities, price, etc, so I'm wondering what the best way to keep these types of dynamically generated pages with urls like /property-search-page/?location=any&status=any&type=any&bedrooms=9&bathrooms=any&min-price=any&max-price=any from indexing. Any assistance will be greatly appreciated : ) Technical SEO | | wcbuckner0
- 
		
		
		
		
		
		Should i Noindex my privacy policy page?:
 Hi, We have a privacy policy page but it can be found at Copyscape and might affect Google Panda content farming. My questions is, should i Noindex my private policy page?: Technical SEO | | chanel270
- 
		
		
		
		
		
		Sitemap for dynamic website with over 10,000 pages
 If I have a website with thousands of products, is it a good idea to create a sitemap for this website for the search engines where you show maybe 250 products on a page so it makes it easy for the search engine to find the part and also puts that part closer to the home page? Seems like google likes pages that are the closest to the home page (less clicks the better) Technical SEO | | roundbrix0
- 
		
		
		
		
		
		Which pages to "noindex"
 I have read through the many articles regarding the use of Meta Noindex, but what I haven't been able to find is a clear explanation of when, why or what to use this on. I'm thinking that it would be appropriate to use it on: legal pages such as privacy policy and terms of use Technical SEO | | mmaes
 search results page
 blog archive and category pages Thanks for any insight of this.0
 
			
		 
			
		 
					
				 
					
				 
					
				 
					
				 
					
				 
					
				 
					
				