Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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
29 votes
2 answers
23k 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
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
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
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
769 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
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
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
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
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
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
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
2 answers
1k views

SEO on pages whose content is determined by query string in URL

I have a blog as part of my site. The address of the blog is ../blog.php. If you go to blog.php you will see the most recent blog entry and there will be links to other entries. The links to other ...
365SplendidSuns's user avatar
2 votes
3 answers
994 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
0 votes
1 answer
2k views

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

I was reading this post here. But it does not answer my question fully. I have 2 URL's display that the same content, but contain the exact same query string parameters, the URL's are pretty much the ...
Adam's user avatar
  • 737