20
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 ...
5
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 ...
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 ...
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.)
...
4
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. ...
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 ...
4
votes
Does query string case affect SEO?
It does not matter, but you must be consistent, as all three examples you showed represent different URLs to be indexed.
Some like to stick to lowercase as it reduces the possibility of human error ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
3
votes
Does Google care about query string case sensitivity, and also does it care about correctness of casing?
Does Google differentiate them? What is Google's behavior, if it finds both of them on my website for a single page?
As Google said, case sensitive URLs might lead to multiple URLs indexed:
“By ...
3
votes
Use query parameters or hashes when implementing referral codes?
I don't think either approach is ideal.
The parameter approach is likely the better of the 2 as it does not try and jump to a non-existent anchor point on the page.
A more appropriate solution might ...
2
votes
Remove everything after the question mark in the URL?
Even easier:
RewriteCond %{QUERY_STRING} .
RewriteRule ^ %{REQUEST_URI}? [R=301,L]
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:
...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
2
votes
Accepted
Consequences of adding more URL query parameters?
Disclaimer: Parts of this answer are summarised from excerpts of this blog by SEJ.
Yes, adding or removing query parameters periodically may have some negative consequences on SEO, if not handled ...
2
votes
How to exclude URL parameters from Google Analytics reports?
Only ? indicates a query parameter; adding f to the exclusion list would remove ?f=... parts of a URL but won't affect /f/....
You should be able to do this with a filter, though. Add a new filter of ...
2
votes
Is a URL with querystring SEO friendly?
While search engines can recognise these kinds of URL, I can't see them being considered search engine friendly as anything after the ? would be considered a key or value.
Its fairly standard now to ...
2
votes
Redirect URL ending in certain `variable=value` query string, to `URL?variable` (i.e., strip `=value`)
Your RewriteCond is incidentally valid but fundamentally wrong. For the URL https://example.com/?amp=1, the characters /? are not part of the %{QUERY_STRING} value, which is amp=1 in fact.
I said '...
1
vote
Will search engines react to querystring ids as different pages?
Read Google's article about duplicate URLs and duplicate pages:
https://support.google.com/webmasters/answer/139066?hl=en
Also you can specify in Google Search Console which query params should be ...
1
vote
Accepted
Will search engines react to querystring ids as different pages?
but will they show it as different pages?
Yes, they are different URLs, therefore (unless otherwise stated) they will be seen and indexed as different pages in the SERPs.
If you wanted search ...
1
vote
Is there a set of well-known tracking parameters besides utm_*?
Part of my RewriteCond used to deduplicate URL for a more efficient caching:
utm_(?:source|medium|campaign|term|content)|gclid|fbclid|msclkid|emci|emdi|ceid|sourceid|hootPostID|__s
gclid
fbclid
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
query-string × 103seo × 29
url × 19
htaccess × 15
google-analytics × 14
mod-rewrite × 14
url-parameters × 14
redirects × 11
301-redirect × 10
url-rewriting × 8
google × 6
404 × 5
wordpress × 4
php × 4
apache × 4
canonical-url × 4
googlebot × 3
robots.txt × 3
facebook × 3
pagination × 3
google-search-console × 2
google-search × 2
html × 2
web-crawlers × 2
search-engines × 2