Using 2 wildcards in the robots.txt file
-
I have a URL string which I don't want to be indexed. it includes the characters _Q1 ni the middle of the string.
So in the robots.txt can I use 2 wildcards in the string to take out all of the URLs with that in it? So something like /_Q1. Will that pickup and block every URL with those characters in the string?
Also, this is not directly of the root, but in a secondary directory, so .com/.../_Q1. So do I have to format the robots.txt as //_Q1* as it will be in the second folder or just using /_Q1 will pickup everything no matter what folder it is on?
Thanks.
-
I'm not 100% positive, however it does make sense to use it this way.
User-agent: *
Disallow: /*_Q1$
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
How safe is it to use a meta-refresh to hide the referrer?
Hi guys, So I have a review site and I'm affiliated with several partnership programs whose products I advertise on my site. I don't want these affiliate programs to see the source of my traffic (my site), so I'm looking for a safe solution to hide the referrer URL. I have recently added a rel="noreferrer" tag to all my affiliate links, but this method isn't perfect as not all browsers respect that rule. After doing some research and checking my competitors I noticed that some of them use meta-refresh, which seems more reliable in this regard. So, how safe is it to use meta-refresh as means of hiding referrer URL? I'm worrying that implementing a meta-refresh redirect might negatively affect my SEO. Does anybody have any suggestions on how to hide the referrer URL without damaging SEO? Thank you.
Intermediate & Advanced SEO | | Ibis150 -
Do you recommend using tabs on desktop in 2017
Hi, I know google is moving toward mobile first world but I am wondering if tabs on desktop are still ignored by google those days and what you recommend ? Thank you,
Intermediate & Advanced SEO | | seoanalytics0 -
Site Not Indexing After 2 Weeks - PA at 1
Hi Moz Community! I'm working as a digital marketing consultant for an organization that uses us for their online registration - we do not manage their web page. The issue that I am hoping you might have some ideas on is that their SERPS still aren’t making much of a recovery since they revamped their site in mid August. I ran a MOZ campaign for them and despite that they (eventually) got all their 301s in place, they submitted an updated sitemap to Google, aren’t hitting any crawl errors, and have a working robots.txt over two-thirds of their site pages don’t seem to be indexing. MOZ is giving most of them a Page Authority of 1, and when I login to their GWT, it’s showing me that only 3 pages have been indexed of the 315 URLs submitted. I know Google doesn’t make any guarantees in index update timelines, but 2+ weeks seems like a long time 😞 Their website is https://www.northshoreymca.org/. The site has a DA of 43 but most of the pages on the main nav are still at 1. They gave me permission to share in this forum because we're really trying to figure out a recovery strategy. Any thoughts or ideas as to what might be causing this? Is there anything else that you think I should check or that might be causing an issue? Is it possible that Google is just taking this long to index their page? Note: this page is built with Drupal. THANK YOU!
Intermediate & Advanced SEO | | camarin_w0 -
Using Meta Header vs Robots.txt
Hey Mozzers, I am working on a site that has search-friendly parameters for their faceted navigation, however this makes it difficult to identify the parameters in a robots.txt file. I know that using the robots.txt file is highly recommended and powerful, but I am not sure how to do this when facets are using common words such as sizes. For example, a filtered url may look like www.website.com/category/brand/small.html Brand and size are both facets. Brand is a great filter, and size is very relevant for shoppers, but many products include "small" in the url, so it is tough to isolate that filter in the robots.txt. (I hope that makes sense). I am able to identify problematic pages and edit the Meta Head so I can add on any page that is causing these duplicate issues. My question is, is this a good idea? I want bots to crawl the facets, but indexing all of the facets causes duplicate issues. Thoughts?
Intermediate & Advanced SEO | | evan890 -
Is there a limit to images file names?
Hi, I have an eCommerce site with hundreds of product images. For management reasons files are named in length to have the product details in them.
Intermediate & Advanced SEO | | BeytzNet
Is there a limit for a filename length before it is considered ambiguous or spammy etc.?
(it usually ranges 50-70 chars). Thanks0 -
Use of subdomains, subdirectories or both?
Hello, i would like your advice on a dilemma i am facing. I am working a new project that is going to release soon, thats a network of users with personal profiles seperated in categories for example lets say the categories are colors. So let say i am a member and i belong in red color categorie and i got a page where i update my personal information/cv/resume as well as a personal blog thats on that page. So the main site is giving the option to user to search for members by the criteria of color. My first idea is that all users should own a subdomain (and this is how its developed so far) thats easy to use and since the domain name is really small (just 3 letters) i believe subdomain worth since personal site will be easy to remember. My dilemma is should all users own a subdomain, a subdirectory or both and if both witch one should be the canonical? Since it said that search engines treat subdomains as different stand-alone sites, whats best for the main site? to show multiple search results with profiles in subdomains or subdirectories? What if i use both? meaning in search results i use search directory url for each profile while same time each profile owns a subdomains as well? and if so which one should be the canonical? Thanks in advance, C
Intermediate & Advanced SEO | | HaCos0 -
Using comment boxes for building links (the right way)
Some people see this kind of link building as spammy mainly because of automated systems I guess making it spammy. But what if you use your company name linking to your site to indicate who has posted it and then actually contribute some good discussion. A lot of these are no-follow (although I have got it into my head even though they are no follow not passing juice I still think Google counts the link and it does something). So I want to start doing some of this, for example squidoo. Lots of lens with great content that I could quite easily comment on with 50 words+
Intermediate & Advanced SEO | | activitysuper0 -
Article + 2 links to the same root domain
I am writing an article that has 2 links: The fist one is to : http://xxx.net/the-be... The second one is to : http://xxx.net/ The links are with different ancor texts and I am wondering about the link power they will bring to my website. Will both links count? Will the first one send significantly more PR than the second one ? I am asking this because my MAIN objective is the second link. Much Thanks Alex
Intermediate & Advanced SEO | | IamSharp0