Questions tagged [query-string]

The part of the URL after the first question mark and before the fragment identifier, often used to pass variable URL parameters to the underlying script.

Filter by
Sorted by
Tagged with
31 votes
5 answers
4k views

Why is it preferable to use paths with slashes instead of query-string variables in a web page URL?

Why is it preferable to use paths with slashes instead of query-string variables in a web page URL?
Chris W. Rea's user avatar
  • 3,763
29 votes
2 answers
22k views

Is a URL with a query string better or worse for SEO then one without one?

I want to know, is there a huge difference in terms of SEO between these URLs: example.com/ontario/toronto/listings or example.com/listings.php?p=ontario&c=toronto Will one URL rank higher ...
scarhand's user avatar
  • 437
16 votes
1 answer
12k views

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

Should I remove the entire query string from URLs in the canonical meta tag? For example this URL: https://example.com/Turkey/Istanbul/Vehicles/Car/Peugeot?b=11&d=2 This b=11 returns a list of ...
Pedram's user avatar
  • 317
13 votes
2 answers
26k views

URL with query disables caching?

Does having a query string attached to a URL cause browsers to never cache it? For instance, my site does something like this: /radar-picture.png?v=sep2013 And it would appear that FireFox never ...
Mr. Smith's user avatar
  • 255
9 votes
2 answers
39k views

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

Some bots have been crawling my site for every link that ends with: ?utm_source=dlvr.it&utm_medium=twitter I haven't checked out its IP. Then other bots (10+) follow the link rules ?utm_source=...
space and time's user avatar
8 votes
1 answer
490 views

How can I identify unknown query string fragments that are coming to my site?

In the Google Analytics content overview for a site that I work on, the home page is getting many pageviews with some unfamiliar query string fragments, example: /?jkId=...
Jon's user avatar
  • 183
7 votes
3 answers
7k views

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

I have the URL http://www.example.com/shopping/books/?b=9 and the following robots.txt file: User-agent: * Disallow: /?b=9 But when I test this in Google Webmaster Tool's robots.txt tester it is ...
Amit Rajawat's user avatar
7 votes
2 answers
731 views

Is there a set of well-known tracking parameters besides utm_*?

I am collecting a large number of URLs. I am not responsible for the websites in question, and I want to remove tracking parameters that do not affect the content of the website. With the tracking ...
Joe's user avatar
  • 241
6 votes
2 answers
1k views

How to keep crawler robots from indexing my page when there is a query string present in the URL?

I have a /products page. In that page, users may use filters to select the products they want to see. Those filters will work using query strings like: /products?brands=X,Y&size=1,2 and so on. I ...
cbdeveloper's user avatar
5 votes
3 answers
787 views

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

This post seems to have my answer: How can I redirect old WordPress URL (with a query string) to new URL using .htaccess? However, this does not seem to play nicely with WordPress' previous rewrite ...
emRae's user avatar
  • 61
5 votes
1 answer
348 views

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

I have a search page on a hotel property website that can have up to 12 parameters in the url. Note that sometimes it may have none of these parameters. The parameters are all for optional ...
AdamJones's user avatar
  • 312
5 votes
1 answer
14k views

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

I've recently noticed a number of errors in our sites' error logs which are a result of what appears to be a cache-buster being incorrectly added to URLs. The requests in question all seem to have "?...
Carson63000's user avatar
5 votes
1 answer
1k views

How should incorrectly encoded URLs be handled?

Just recently noticed that some sites link with the URL incorrectly percent-encoded, to which my server (LAMP) responds with a 404 Not Found. For example, for a URL of mine like this: http://www....
Itai's user avatar
  • 6,007
4 votes
2 answers
286 views

Just discovered something I never knew about 404 - could someone explain this

I had always thought that placing anything spurious after the 404 which the server didn't understand would result in a 404; however I had a closer look at a WordPress site which I was building and ...
byronyasgur's user avatar
4 votes
1 answer
4k views

Is it recommend to create sitemaps with query strings (i.e. URL parameters)?

I am considering creating a "My products" page on a site where a user will be able to search for product information. This page will also display the product information. I need google to know about ...
Jérôme Verstrynge's user avatar
4 votes
2 answers
186 views

RewriteRule with Query_String

I have http//royatlon.north.com/cybersource/fp/clear.png?org_id=1snn5n9w&session_id=sterling40272003&m=1 and I would like to rewrite it to this: https://media.north.com/fp/clear.png?...
raj's user avatar
  • 41
4 votes
3 answers
115 views

Use query parameters or hashes when implementing referral codes?

We're implementing a feature where users can generate unique referral links that they can share and receive rewards when people sign up. The pages themselves have identical content. There are two ...
dodov's user avatar
  • 171
4 votes
1 answer
229 views

Does Google care about query string case sensitivity, and also does it care about correctness of casing?

Consider these two query string parameters: ?category=healthAndBeauty ?category=healthandbeauty Does Google differentiate them? What is Google's behavior if it finds both of them in my website for a ...
Ali EXE's user avatar
  • 171
4 votes
1 answer
1k views

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

I'm using query strings to burst out of cache, e.g.: mysite.css?201708311009 where the date is that of the last modification date of the file. Running a speed test on PingDom gets me this result: ...
Fabien Snauwaert's user avatar
3 votes
1 answer
2k views

Pass IMG SRC via GET and echo it? Is that really secure?

I was wondering how I can make a really simple GET and echo request more secure The code: $src = $_GET['src']; echo "<img src='$src' />"; Basically, I have a URL like example.com/link.php?...
mashup's user avatar
  • 185
3 votes
2 answers
10k views

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

I have removed a forum system from my CMS and now I want to return an 410 status code whenever a search engine visits the former posts. I know that I have to use a number of Rewrite Rules to do the ...
Jose's user avatar
  • 31
3 votes
1 answer
573 views

Does query string case affect SEO?

Our team is working on how to handle query strings. Does it matter in terms of SEO whether we use pascal case, camel case or kebab case? Which is best? https://example.com/page?dealType=m&...
Mohammad Miras's user avatar
3 votes
1 answer
4k views

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

I'm trying to redirect a URL ending with parameters to another URL without those parameters. https://example.com/newsroom/news-events/news.html?L=1&tx_news_pi1%5Bnews%5D=29&tx_news_pi1%...
Miama's user avatar
  • 31
3 votes
2 answers
105 views

Does rearranging query parameters result in duplicate content?

I've noticed one bot in particular in our log files that rearranges query parameters when scanning our website. This got me thinking. Does allowing rearranging of query parameters trigger duplicate ...
nrsbus's user avatar
  • 41
3 votes
1 answer
1k views

How can I prevent query strings from impacting Google Analytics?

In Google Analytics I am seeing URLs that should be treated as the same page are showing in GA as unique. For example: /?optimizely_log=false&optimizely_cache_buster=1389806928991 /?...
schmidlop's user avatar
  • 178
3 votes
2 answers
6k views

How do I redirect a URL using rewrite in .htaccess that has a question mark and forward slash where page.html is the variable?

Hello and thanks to all who contribute to this seemingly mind boggling puzzle. I apologize in advance if .htaccess questions belong on server fault. So I have to move a domain to our hosting servers, ...
Howard Davis's user avatar
3 votes
2 answers
575 views

Where is the query string pagewanted=all coming from?

On my site I use CodeIgniter, which does not allow any use of query strings. Any unacceptable characters in a URL result in a 400 error. In Google Webmaster Tools I'm seeing several crawl errors ...
DisgruntledGoat's user avatar
3 votes
1 answer
726 views

Redirect URL ending in certain `variable=value` query string, to `URL?variable` (i.e., strip `=value`)

I'm trying to create a 301-rewrite for URLs ending with ?amp=1 to nearly the same URL and query string, just stripping the value (=1). Examples: https://example.com/?amp=1 should redirect to https://...
andrewgoma's user avatar
3 votes
2 answers
794 views

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

One of our sites is seeing ~100 sessions a day landing on the home page with a query string like the following appended: ?p=1471086892&subid=526&uid=48752857D549575A Each one has the same ...
PeterA's user avatar
  • 141
3 votes
1 answer
1k views

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

The answer seems like a plain-as-day yes, but I'd rather have a more certain idea. Should an out-of-range pagination query, e.g. 11 of 10, produce a 404? I'm working on a React.js application where ...
Daniel B.'s user avatar
  • 165
3 votes
1 answer
1k views

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

I've received complaints that the links that my software is generating aren't following the W3C URL-specification. http://www.w3.org/Addressing/URL/url-spec.txt The links generated looks like this: ...
Emil Hemdal's user avatar
3 votes
1 answer
13k views

IIS 7 URL Rewrite Rule using query string variable

Trying to create a URL Rewrite rule for IIS 7.5 to read the query string parameter and redirect requests to a new URL structure - for example: http://www.example.com/people/profile.aspx?dw to a new ...
cpuguru's user avatar
  • 215
3 votes
1 answer
4k views

Apache rewrite rule that matches a specific query string

I need to rewrite a specific WordPress URL to a 404 error: ?page_id=15 to 404 How can I match the query string? Apparently Apache doesn't feed that to the rewrite mod...
cfischer's user avatar
  • 223
3 votes
1 answer
904 views

301 redirect rewrite query string in .htaccess [duplicate]

I am trying to perform a 301 redirect in .htaccess and I need to remove the query string ?view=full. Here is what I have that is not working: RewriteRule ^/contact/?view=full$ /contact/ [R=301,L] I ...
Guy's user avatar
  • 41
3 votes
1 answer
4k views

How to Redirect Pages with Query String?

I want to Redirect as seen below: https://example.com/p1/p2?sort=p.model&order=ASC&page=2 to https://example.com/p3/p4?sort=p.model&order=ASC&page=2 Also, I have this code in my ....
Pasakgroup's user avatar
3 votes
3 answers
3k views

Prevent Google from indexing and caching pages with query strings

I have a WordPress site is running on my domain. There are some pages that are indexed and cached by Google with query string like this: example.com/category/xxx/?post_type=product. I want Google to ...
Cuong Phan's user avatar
3 votes
1 answer
982 views

Apache mod_rewrite problem with adding a query string on an internal rewrite

I need to replace /xyz with /index.html?dh=xyz. I use the following config in httpd.conf: RewriteCond %{QUERY_STRING} "!dh" RewriteRule "^/(.*)$" "/index.html?dh=$1" [R] This works perfectly if [R] ...
TomasJ's user avatar
  • 31
3 votes
1 answer
2k views

Would a query string at the end of an img src url effect SEO negatively?

Im trying out a new image serving solution that serves responsive images. It does so by detecting the img tag elements width and then serving a version of the image that is suitable for that size. It ...
sam's user avatar
  • 4,627
3 votes
0 answers
40 views

'[0] appended to multiple URL parameters, is something scanning for vulnerabilities?

I use a WAF that monitors suspicious query string and form POST values. Typical script-kiddie stuff like common SQL injection strings, etc. Over the last several months I've noticed a dramatic uptick ...
CodeWhisperer's user avatar
3 votes
0 answers
2k views

Query string parameter (?) after fragment identifier (#)

My dev is rewriting the filters plugin for my eCommerce site as our current plugin slows pageload, and part of this is to rewrite pagination and he has asked me how the query strings should be handled....
Collo's user avatar
  • 101
3 votes
0 answers
2k views

Matrix URL vs query string URL

Matrix URL is a way to pass data in URL to the program, it's like a query string, but a bit nicer. Matrix URL notation is an idea first introduced in a 1996 proposal by the founder of the web, ...
Mohammad Kermani's user avatar
2 votes
2 answers
231 views

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

I have a site with products, which can be searched using a convoluted search form, with quite a few input fields. I send the data by POST, to the same page, so I can list all products in the URL: /...
Cesar's user avatar
  • 405
2 votes
2 answers
4k views

Remove everything after the question mark in the URL?

Is there any way to redirect a page with a question mark in the URL, to the same page, but with everything after the question mark removed? For example: From: /residential-properties/projectname/?...
Mansoor's user avatar
  • 21
2 votes
1 answer
767 views

Can punctuation inside a query string be valid?

I'm still working on an apache module to fight google's ability to find duplicate content on my website and slashes are apparently throwing apache off. My question is this. Is punctuation perfectly ...
Mike -- No longer here's user avatar
2 votes
3 answers
953 views

Will removing unused query string parameters negatively affect SEO?

Will changing links to remove query string parameters that are no longer used have any negative impact on search engine rankings? Say I have a page about.php on my site, and all of my links to this ...
trm's user avatar
  • 123
2 votes
2 answers
1k views

How to exclude URL parameters from Google Analytics reports?

The number of unique URLs on our site exceeds the limit in our Google Analytics. We tried to exclude URL Query Parameters in the View Settings but it doesn't work, GA continue to record all of them as ...
Vasyl Kosteniuk's user avatar
2 votes
1 answer
446 views

Redirect query string URL via .htaccess

I am trying to redirect all query strings to a new URL. Search query example www.example.com/?s=cars to resolve to www.example.com/?search_gcse/?q=cars ("cars" is just an example). What is the ...
emmlinisrael's user avatar
2 votes
1 answer
107 views

Should I be 301 redirecting query strings in shopping carts?

Should I redirect query strings in a shopping cart discovered by Google Webmaster Tools, which we don't want to show up there. Should we 301 URL like this? example.com=shop.ask&product_id=31&...
Boris_yo's user avatar
  • 285
2 votes
2 answers
88 views

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

I've set up site-search for our main Google Analytics profile, which filters GET named "q". While this works nicely, it also collects data from our starting page (which contains a dealer locator which ...
Ahatius's user avatar
  • 121
2 votes
1 answer
233 views

Making Search Queries Indexable

Looking around, most sites (eg. Amazon) encode the parameters of searches into query string. This means that search engines cannot index these queries. Why don't such sites use URLs rather than query ...
Undistraction's user avatar