14 votes
Accepted

Should query strings be included or removed from the canonical tag?

Query parameters can be used for many purposes. Some of them don't specify the page content and some of them do. If the query parameter is used to specify the content loaded onto the page, then it ...
user avatar
5 votes

How can I use .htaccess to respond with 403 forbidden status for URLs that contain a query string?

?utm_source=dlvr.it&utm_medium=twitter utm_source and utm_medium are used by Google Analytics (and possibly other trackers) to monitor campaigns, so blocking access purely on this query string ...
user avatar
  • 40.9k
4 votes
Accepted

How can I use .htaccess to respond with 403 forbidden status for URLs that contain a query string?

If you have the mod_rewrite module installed, then you can put this in your .htaccess file in the root folder of your website (which usually is the public_html folder): RewriteEngine On RewriteRule ^\...
user avatar
4 votes
Accepted

Can punctuation inside a query string be valid?

Is punctuation perfectly acceptable in the middle of a query string? Yes, but it depends on the punctuation. RFC 3986 Section 3.4 defines what characters are permitted in the query string part of the ...
user avatar
  • 40.9k
4 votes

Temporarily redirect WordPress url with query string from root directory to new url

I think you have two problems. One, the rewrite are checked in order and you put the more constraining one after the least constraining one (i.e. the redirect with your query string should be first.) ...
user avatar
  • 2,153
4 votes
Accepted

How to make a graph in Google Data Studio showing specific url parameters that were queried in my site?

Constructing a Data Studio Report with Regex Create a report and click edit next to your data source Select "Add Field" Creating Custom Regex Field In Data Studio escaping is weird. You ...
user avatar
  • 4,425
3 votes
Accepted

Do the internal searches need to be by GET for SEO purposes?

While all internal search result urls contain no unique information, they are for SEO purposes irrelevant and harmful. Making internal search with GET you produce search result urls, which you later ...
user avatar
  • 9,557
3 votes

Do the internal searches need to be by GET for SEO purposes?

Internal search results shouldn't actually be indexed. Google's Webmaster Guidelines state: Use robots.txt to prevent crawling of search results pages or other auto-generated pages that don't add ...
user avatar
  • 5,794
3 votes

Redirect query string URL via .htaccess

Partly depends on which question mark you want to keep. You have two question marks in the URL that you're trying to resolve to & that won't work. I'll assume that the last question mark is the ...
user avatar
3 votes

How do I disallow a specific query string in robots.txt?

robots.txt is prefix matching, so a rule like Disallow: /?b=9 will block all URLs that start /?b=9. Your URLs start /shopp... so they are not blocked. However, you can use a * (wildcard - 0 or more ...
user avatar
  • 40.9k
3 votes

URL encoded query string with embedded null %00 breaks on some servers

As @closetnoc suggests, the presence of the NULL char in a URL could be seen as the source of an attack (whether the software is vulnerable or not is another matter), so some servers do actively ...
user avatar
  • 40.9k
3 votes
Accepted

Broken URL requests with "?rand=0.nnnnnnnnnnnnnnnnn" querystrings from Chrome users

I have an application that has started seeing this issue around noon on Nov 20, 2014 (Eastern), with near the exact same issues mentioned. I was able to connect with one of our users who indicated ...
user avatar
  • 46
3 votes

Should I be 301 redirecting query strings in shopping carts?

You don't want to redirect them - that will probably break your site's functionality. There are various means of managing parameters for SEO purposes; since you mention Google Webmaster Tools, you may ...
user avatar
  • 7,731
3 votes

URL with query disables caching?

Adding a query-string key/value pair to a static resource (such as an image, CSS or JavaScript) can cause caching issues. Specifically, since you mentioned Firefox, your issue could be related to a '...
user avatar
  • 5,444
3 votes

“Resources with a "?" in the URL are not cached by some proxy caching servers”

From http://bizcoder.com/caching-resources-with-query-strings: Steve demonstrates when using a version number in the query string, the Squid proxy cache does not cache the static file at all. He ...
user avatar
  • 4,334
3 votes

Does rearranging query parameters result in duplicate content?

With regards to duplicate content, as long as the correct canonical tag is set to match the original page, it should be fine. In saying that, it's definitely not optimal to have duplicate pages with ...
user avatar
  • 144
3 votes

How to redirect a URL and remove parameters using .htaccess?

To redirect the exact URL as stated you will need to use mod_rewrite (ie. RewriteRule and RewriteCond directives) since only mod_rewrite is able to match the query string part of the URL (ie. ...
user avatar
  • 40.9k
2 votes

In Google Analytics, collect the site search query parameter only on a specific page

Can you change the app to use a different querystring name? Or in the GA tracking on the page, pass a custom page view that doesn't have that parameter? If that's not possible, then have you tried ...
user avatar
  • 76
2 votes

What rewrite rule would show the 410 (gone) status for removed forum URLs?

Based on the sample URL's you provided, its good to use these lines at the top of your .htaccess file in the document root folder (where index.html normally is located): RewriteEngine On RewriteRule ^...
user avatar
2 votes

What rewrite rule would show the 410 (gone) status for removed forum URLs?

%{QUERY_STRING} referrs to everything after the ? in the URL. Your URL doesn't have a question mark, so it isn't matching it. You just want to make sure the that the URL contains forum-viewtopic or ...
user avatar
2 votes

Usage of special characters in the URL path instead of query-strings to allow relative linking in a web proxy

It appears that the only thing that you would need to escape in that URL would be the : https://organization.proxive.se/proxive/https%3A//www.google.com/ Then your URL wouldn't use any disallowed ...
user avatar
2 votes
Accepted

Will removing unused query string parameters negatively affect SEO?

On the long term, no, but on the short term there might be some fluctuation. There are two possibilities to mitigate this issue: - In Google Webmaster Tools, in Crawl > URL Parameters, you can tell ...
user avatar
2 votes

Is the order of querystring parameters a factor in duplicate content in Google?

www.example.com/products?category=A&category=B www.example.com/products?category=B&category=A These two URLs are technically different. So if they are both available for indexing and return ...
user avatar
  • 40.9k
2 votes

Robots Meta Tag and query strings

If you "dynamically add that meta tag" for only the first URL then it will not affect indexing of the second. Whilst it might be the same file (product.aspx) that processes both requests, they are ...
user avatar
  • 40.9k
2 votes

Remove everything after the question mark in the URL?

Even easier: RewriteCond %{QUERY_STRING} . RewriteRule ^ %{REQUEST_URI}? [R=301,L]
user avatar
  • 9,557
2 votes

Remove everything after the question mark in the URL?

A literal question mark in the URL marks the start of the query string, so you can test if the query string contains anything and redirect if it does. Using Apache mod_rewrite in .htaccess: ...
user avatar
  • 40.9k
2 votes
Accepted

Should out-of-range pagination query produce a 404?

Ideally a 404 status would be used. However, it is not uncommon for a 200 status in such cases. If the 9th page is the last page, ensure that it doesn't link to page 10. If there are no links ...
user avatar
2 votes

What is adding p, subid, and uid variables to the query string of a site url?

These are all used in tracking URLs. A SubID is a string of alphanumeric characters generated at the end of a redirect URL, which records a user-defined variable. uid is Unique Identifier. Check if ...
user avatar
2 votes

Prevent Google from indexing and caching pages with query strings

You can instruct Google how to treat urls with parameters, they have a tool for that in Google Search Console. They are passive parameters if they do not change content on a page. If you categorize ...
user avatar
  • 3,358
2 votes
Accepted

How to redirect all pages of site A, including those with query strings, to homepage of site B

You should add the "query string discard" or QSD flag to your rewrite rule: RewriteRule ^(.*)$ https://SiteB.tld/ [R=301,QSD,L] From the documentation: When the requested URI contains a query ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible