How to set up 301 redirect for URL with question mark
-
I have encountered some issue with 301 redirect and htaccess file.
I need to redirect the following url:
to:
The 301 redirect command I wrote in htaccess file is as follow:
Redirect 301 /?specifications=colours/page/3 http://www.domain.com/colours
And it doesn't work at the moment. What is the correct way to set up 301 redirect here?
Your help will be sincerely appreciated!
-
You might want to try escaping the question mark, so:
/?specifications
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
-
(Urgent) losing traffic after 301 redirect
We face a seo problem of losing traffic after 301 redirect.We have used 301 redirect from a sub-domain url to main domain, after a few month, we discovered that the traffic in google is dropped 40% as well as yahoo dropped 50% without reason, we have updated sitemap already, but we cannot find any reason for the traffic dropped till now..The original url (more then 5000 links)https://app.example.com/ebook Redirected Urlhttps://www.example.com/ebookThank you for your help!
Intermediate & Advanced SEO | | yukung0 -
Redirecting a Few URLs to a New Domain
We are in the process of buying the blog section of a site. Let's say Site A is buying Site B. We have taken the content from Site B and replicated it on Site A, along with the exact url besides the TLD. We then issued 301 redirects from Site B to Site A and initiated a crawl on those original Site B urls so Google would understand they are now redirecting to Site A. The new urls for Site A, with the same content are now showing up in Google's index if we do a site:SiteA.com search on the big G. Anyone have any experience with this as to how long before Site A urls should replace Site B urls in the search results? I undestand there may be a ranking difference and CTR difference based on domain bias, etc... I'm just asking if everything goes as planned and there isn't a huge issue, does the process take weeks or months?
Intermediate & Advanced SEO | | seoaustin0 -
Can multiple geotargeting hreflang tags be set in one URL? International SEO question
Hi All, Thank you for this great post! I have a question please. If i target www.onedirect.co.nl/en/ in English for Holland, Belgium and Luxembourg, are the tags below correct? English for Holland, Belgium and Luxembourg: http://www.example.co.nl/en/" hreflang="en-nl" /> http://www.example.co.nl/en/" hreflang="en-be" /> http://www.example.co.nl/en/" hreflang="en-lu" /> AND Targeting Holland and Belgium in Dutch: Pour la page www.onedirect.co.nl on peut inclure ce tag: http://www.example.co.nl" hreflang="nl-nl" /> http://www.example.co.nl" hreflang="nl-be" /> thanks a lot for your help!
Intermediate & Advanced SEO | | Onedirect_uk0 -
Tags: 301 Redirect, Rel Canonical, or Leave Them Alone?
The title is pretty self explanatory ... we have cornerstone pages ( such as a page for "Widget A") that rank for a certain keyword and then relevant articles that all link to that particular cornerstone page. Each of those articles has the same tag ("Widget A") to tie them together. If you click on that tag, it creates a list of all articles with that tag. We think that this may be siphoning off some of that keyword Google Juice from our Widget A cornerstone page. Our question is, should we 301 redirect that tag to point to the Widget A cornerstone page, use a rel canonical pointing to the Widget A cornerstone page, or just leave it alone like we are doing now? Our goal is to have the Widget A cornerstone page receive the most Google Juice possible and not be diminished by the tags. Note* - We don't want to stop Google from crawling the tags because some of our tags rank highly for other keywords. Also, we tried 301 redirecting the tags before and our ranking dropped significantly ... however, we made a lot of site changes at the same time so we are not sure if the drop in rank was due to redirecting the tags or the site changes. Help please ... thanks in advance 😉
Intermediate & Advanced SEO | | Humanovation0 -
Moving to a new domain name - 301 redirect NOT an option
Hi everyone My question concerns moving from an old to a new domain name without losing all previous SEO efforts. I am aware that a properly executed 301 redirect is the answer and way to go as well as telling Google about it in Webmaster Tools. However, what is the situation, if you do not own the old domain name anymore? If you have no means of getting back the old domain name and wanting to basically mask/switch the already existing website to the new domain name, will search engines penalise the "new site" as a duplicate, since the "old site" is still in the search engine rankings? I know that not being able to execute a proper 301 redirect and starting out with a new domain means a fresh start, but what is the best way to minimise the negative impact (if any)? Basically dropping the sites' current content and starting out new in favour of the new domain name is not really an option. Even if you were to take the content from the old site and place it on another site, this would surely be seen as duplicate too. Anyone thinks that Webmaster Tools/Google is savvy enough to spot the difference when the "old site" gets removed and the "new one" added instead (in Webmaster Tools). I read something along the lines about having your host point the DNS from the old site to the new one. Could something like be helpful? Thanks all in advance for your help and input!
Intermediate & Advanced SEO | | Hermski0 -
301 Redirection
Hi there guys, I have a question about redirection. My boss has just bought a new domain name and he wants it to redirect to our current site when looking for specific products. www.example.com is our current website www.productname.com is the new domain So the new domain would be redirected to example.com. Would that be considered against Google Policies? Thanks
Intermediate & Advanced SEO | | PremioOscar0 -
Time sensitive: HELP! We are having a problem doing a 301 redirect.....what can we do instead?
Our website has dynamic URLs and we are moving to another server/platform. 301 redirects is looking like a highly unlikely solution. A 3rd party company is handling the back-end of the website which they say works more like a "search engine" than a traditional website. Maybe that explains why they're having a hard time with the 301 redirects. Worst case scenario: we can't use the 301 redirect. What else can we do? We are considering "Indicate your canonical (preferred) URLs by including them in a Sitemap" as Google describes here: http://support.google.com/webmasters/bin/answer.py?hl=en&answer=139066#2. I'm wondering if this method only applies to duplicate content........and what would happen once the old website results in a 404 page...... HELP! We need to cross over to the new platform as soon as possible.
Intermediate & Advanced SEO | | PatriotOutfitters810 -
301 a page and then remove the 301
I have a real estate website that has a city hub page. All the homes for sale within a city are linked to from this hub page. Certain small cities may have one home on the market for a month and then not have any homes on the market for months or years. I call them "Ghost Cities". This problem happens across many cities at any point in time. The resulting city hub pages are left with little to no content. We are throwing around the idea of 301 redirecting these "Ghost City" pages to a page higher up in the hierarchy (Think state or county) until we get new homes for sale in the city. At that point we would remove the 301. Any thoughts on this strategy? Is it bad to turn 301s on and off like that? Thanks!
Intermediate & Advanced SEO | | ChrisKolmar0