How to 301 redirect all URLs with /? in?
-
I want to redirect all URLs that have /? in it.
Indexed in Google is a bunch of urls lik:
I want all these URLs to be redirected to my home page.
Any ideas?
-
Just looked at the code and yes it does have rel=canonical
I had no idea that this would tell google its the same as the home page
Thanks for helping, really appreciate it.
-
It looks like you might not have anything to worry about then. pick an example of that url with ?zxxxxx. look at the page source (in firefox, go to tools, web developer, then page source) look for "rel=canonical". if the url indicated there is your homepage then you have nothing to worry about. after a few crawls, Google will know that the url is the same as the home and will remove those urls from the index.
-
Hi Duke, appreciate your help.
The URLs such as mysite.com/?674764 dont have a page. When you visit the URL it just shows the home page.
Ive just looked at another Wordpress site and added this /? in the URL, again it shows the home page without redirecting the URL
See here: http://yoast.com/?
Infact you can enter anything after the /? and it will still show the home page
-
Ok. have a look at the page source and see what canonical is shows. if its pointing to the current homepage then leave it for a while. Google will catch up with and remove it from the index. if not the post a full url here so i can take a look for you.
-
No the URLs just show the home page and not a 404
There are hundreds of them, so would it not be easier to make a 301 rule in the htaccess that redirects all urls that have /? in, rather then manually redirecting each URL?
-
Are these urls currently leading to a 404 page? if they are then follow these steps
- Download the list from Google webmaster tools, use "text to columns" in excel to break the url up so you have "/?xxxx" in one column.
- Install http://wordpress.org/extend/plugins/wordpress-seo/ and go through all the right setup
- click on "edit files" submenu and add this rule Redirect 301 /?xxxx http://www.homepage.com (where /?xxx is the url you want to redirect and "hompage" is the correct url of your homepage.
Hope this helps
-
The URLs have been indexed by Google from an old site.
The new site is now a Wordpress site.
To tidy up what Google has indexed I want to redirect these /? URLs to the home page.
I have tried the "link juice keeper" plugin but that did not work.
I really need to know what code I need to put in the htaccess file to do this. i have tried a whole bunch of things but cant get it to work
-
It depends on the type of system you used to create your website. Speak to your developers and they can create a rule in your htaccess file that will redirect all urls with /?.
Before you do that you need to establish why you want to redirect them and how those urls were created in the first place. understanding how they came about might unearth a cms related issue which can be better address with canonical, webmaster tools url paremeters or other techniques of avoiding duplicate content.
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
-
batch 301 redirects with an external tool
Hi, I am migrating my e-commerce to another platform of a internet company in Brazil (Tray) that has no way to redirect 301 urls in batch, I also do not have access to files and ftp of it. Anyway, as I have hundreds of urls, I would like to know if there is any way to do batch redirects with an external platform tool? Thank you very much in advance
Intermediate & Advanced SEO | | didi090 -
Are there any issues with search engines (other than Google/Bing) reading Protocol-Relative URLs?
Are there any issues with search engines (other than Google/Bing) reading Protocol-Relative URLs? Specifically with Baidu and Yandex?
Intermediate & Advanced SEO | | WikiaSEO0 -
Is a 301 Redirect and a Canonical Tag on Uppercase to Lowercase Pages Correct?
We have a medium size site that lost more than 50% of its traffic in July 2013 just before the Panda rollout. After working with a SEO agency, we were advised to clean up various items, one of them being that the 10k+ urls were all mixed case (i.e. www.example.com/Blue-Widget). A 301 redirect was set up thereafter forcing all these urls to go to a lowercase version (i.e. www.example.com/blue-widget). In addition, there was a canonical tag placed on all of these pages in case any parameters or other characters were incorporated into a url. I thought this was a good set up, but when running a SEO audit through a third party tool, it shows me the massive amount of 301 redirects. And, now I wonder if there should only be a canonical without the redirect or if its okay to have tens of thousands 301 redirects on the site. We have not recovered yet from the traffic loss yet and we are wondering if its really more of a technical problem than a Google penalty. Guidance and advise from those experienced in the industry is appreciated.
Intermediate & Advanced SEO | | ABK7170 -
Removing 301 redirect from 2.5 yr old domain
Hello, Need Advise. We are in Automobiles We have an Automotive site - build 3 yrs back - which is our main site (Site A) We built a separate niche site on Used cars 2.5 yrs back (Site B - url http://www.usedcarindelhi.com) - did seo - promote it for a year and later on in feb 2013 - did 301 domain redirection to Site A Now - we thinking to rebuild Site Site B again and remove redirection Will there be any harm on Site A, as we have now removed the redirection or shall we pass on link from home page of Site B to Site A i.e say Powered by Site A (on Top) or at all no direct linking is actually needed. PS :- Also - can anyone let know the backlink quality of www.usedcarindelhi.com. Its PR 3, DA - 18, Majestic Citation Flow - 18, Trust Flow - 11 . Pl advise
Intermediate & Advanced SEO | | Modi0 -
301's, Mixed-Case URLs, and Site Migration Disaster
Hello Moz Community, After placing trust in a developer to build & migrate our site, the site launched 9 weeks ago and has been one disaster after another. Sadly, after 16 months of development, we are building again, this time we are leveled-up and doing it in-house with our people. I have 1 topic I need advice on, and that is 301s. Here's the deal. The newbie developer used a mixed-case version for our URL structure. So what should have been /example-url became /Example-Url on all URLs. Awesome right? It was a duplicate content nightmare upon launch (among other things). We are re-building now. My question is this, do we bite the bullet for all URLs and 301 them to a proper lower-case URL structure? We've already lost a lot of link equity from 301ing the site the first time around. We were a PR 4 for the last 5 years on our homepage, now we are a PR 3. That is a substantial loss. For our primary keywords, we were on the first page for the big ones, for the last decade. Now, we are just barely cleaving to the second page, and many are 3rd page. I am afraid if we 301 all the URLs again, a 15% reduction in link equity per page is really going to hurt us, again. However, keeping the mixed-case URL structure is also a whammy. Building a brand new site, again, it seems like we should do it correctly and right all the previous wrongs. But on the other hand, another PR demotion and we'll be in line at the soup kitchen. What would you do?
Intermediate & Advanced SEO | | yogitrout10 -
How long for a 301 redirect to pass PR?
Hi, How long does it take for a 301 redirect to pass PR/Juice to the new domain it's redirecting to? From what I understand you tell Google in Webmaster tools this domain is now going to this domain and then setup a file on the old domains hosting to redirect to the new. And that's it! If that is correct how long does it take? 2 days, 2 weeks, months, maybe never??? Cheers
Intermediate & Advanced SEO | | activitysuper0 -
How many pages to 301 Redirect
Hi Mozzers, My site has 11,200 pages indexed in Google and I'm looking to remove some of the lesser content which should probably have been picked up by Panda. However these pages work out to about 1,100 in total and I'm not sure whether to remove these bit by bit or just do it in one fell swoop? Does Google not like a site's indexed pages fluctuating too quickly? Are there any other considerations I should be aware of? Thanks!
Intermediate & Advanced SEO | | panini0 -
Open Site Explorer not Seeing 301 Redirect to non-www
I cannot figure out why open site explorer doesn't see that when you go to http://preferredroofingkc.net/ it redirects to http://www.preferredroofingkc.net/ This is a wordpress installation that uses a cannonical url http://www.preferredroofingkc.net/ The HTACCESS file also has a 301 redirect as follows: RewriteEngine On
Intermediate & Advanced SEO | | RobertFisher
RewriteBase /
RewriteCond %{HTTP_HOST} ^preferredroofingkc.net [NC]
RewriteRule ^(.*)$ http://www.preferredroofingkc.net/$1 [L,R=301] But, open site explorer still shows these sites separately without alerting that there is a 301 redirect.0