Mass 301s
-
Hi All, im trying to find a way to do a mass list of 301s instead of just doing them individually, does anyone have any ideas or tips into how i can do this?
-
Presuming your product pages sit under a /products/ subfolder, you could use this code in your htaccess file:
RewriteRule ^products/(.*)$ /anotherdirectory/$1 [R=301,NC,L]
Or to redirect all to the homepage:
RewriteRule ^products/(.*)$ /$1 [R=301,NC,L]
Obviously you can change the words "products" and "anotherdirectory" to whatever is applicable to you.
For more info on htaccess redirection you can read the Moz guide here.
-
Without seeing the site and proposed structure, it is a little awkward to say with certainty, but if you have a structure for the product pages that can be matched via a wildcard expression, then it is possible to write an .htaccess redirect for it - but most would probably opt to do this with the old page being redirected to the new page - a more straight forward procedure.
-Andy
-
Just the products page
-
What are you trying to redirect? Is it every page in a site, or specific pages?
-Andy
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
-
Changing permalinks in new wordpress website using regex in 301s?
Hi there I am working on a website and we would like to change the permalinks from product-category (replacing with Shop) and product to buy. Currently there are nearly 400 products and multiple categories. Although the website has just been indexed wondering if we need to do 301's? if we did would like to use regex to manage so redirect would be as example: mydomain.com/sub-domain/product-category/ redirecting to to mydomain.com/sub-domain/shop/ (I know you do not need to put in the domain but as an example) - could anyone give me the regex for this? Same for products: mydomain.com/sub-domain/product/sample-product redirect to mydomain.com/sub-domain/buy/sample-product thanks in anticipation
Technical SEO | | musthavemarketing0 -
150+ Pages of URL Parameters - Mass Duplicate Content Issue?
Hi we run a large e-commerce site and while doing some checking through GWT we came across these URL parameters and are now wondering if we have a duplicate content issue. If so, we are wodnering what is the best way to fix them, is this a task with GWT or a Rel:Canonical task? Many of the urls are driven from the filters in our category pages and are coming up like this: page04%3Fpage04%3Fpage04%3Fpage04%3F (See the image for more). Does anyone know if these links are duplicate content and if so how should we handle them? Richard I7SKvHS
Technical SEO | | Richard-Kitmondo0 -
Old domain still being crawled despite 301s to new domain
Hi there, We switched from the domain X.com to Y.com in late 2013 and for the most part, the transition was successful. We were able to 301 most of our content over without too much trouble. But when when I do a site:X.com in Google, I still see about 6240 URLs of X listed. But if you click on a link, you get 301d to Y. Maybe Google has not re-crawled those X pages to know of the 301 to Y, right? The home page of X.com is shown in the site:X.com results. But if I look at the cached version, the cached description will say :This is Google's cache of Y.com. It is a snapshot of the page as it appeared on July 31, 2014." So, Google has freshly crawled the page. It does know of the 301 to Y and is showing that page's content. But the X.com home page still shows up on site:X.com. How is the domain for X showing rather than Y when even Google's cache is showing the page content and URL for Y? There are some other similar examples. For instance, you would see a deep URL for X, but just looking at the <title>in the SERP, you can see it has crawled the Y equivalent. Clicking on the link gives you a 301 to the Y equivalent. The cached version of the deep URL to X also shows the content of Y.</p> <p>Any suggestions on how to fix this or if it's a problem. I'm concerned that some SEO equity is still being sequestered in the old domain.</p> <p>Thanks,</p> <p>Stephen</p></title>
Technical SEO | | fernandoRiveraZ1 -
Need better solution for 301s with Jekyll/S3 Site
Hey Mozzers, So, this isn't the first time that I've come to the community with questions regarding my new site. Although running a site using static HTML-generated pages has been fantastic in the first few weeks as far as load times, it's been a nightmare in terms of a few other SEO-related concerns, namely redirects. In the Q&A post above, Mat Shepherd pointed out a solution for adding 301s to an Amazon Webservices site using their "Redirection Rules" field on the "Configure Bucket for Website Hosting" page. However, I discovered soon after that I was limited to only 50 redirects using this method. Obviously, all things considered, this will not be enough. At this point, I'm basically out of ideas. If anyone else out there has a website with a similar setup, (Jekyll platform hosted on Amazon S3,) that has overcome this problem with redirects, I'd really appreciate hearing from you. Thanks in advance, everyone
Technical SEO | | danny.wood0 -
Mass 404 Checker?
Hi all, I'm currently looking after a collection of old newspaper sites that have had various developments during their time. The problem is there are so many 404 pages all over the place and the sites are bleeding link juice everywhere so I'm looking for a tool where I can check a lot of URLs at once. For example from an OSE report I have done a random sampling of the target URLs and some of them 404 (eek!) but there are too many to check manually to know which ones are still live and which ones have 404'd or are redirecting. Is there a tool anyone uses for this or a way one of the SEOMoz tools can do this? Also I've asked a few people personally how to check this and they've suggested Xenu, Xenu won't work as it only checks current site navigation. Thanks in advance!
Technical SEO | | thisisOllie0 -
Handling 301s: Multiple pages to a single page (consolidation)
Been scouring the interwebs and haven't found much information on redirecting two serparate pages to a single new page. Here is what it boils down to: Let's say a website has two pages, both with good page authority of products that are becoming fazed out. The products, Widget A and Widget B, are still popular search terms, but they are being combined into ONE product, Widget C. While Widget A and Widget B STILL have plenty to do with Widget C, Widget C is now the new page, the main focus page, and the page you want everyone to see and Google to recognize. Now, do I 301 Widget A and Widget B pages to Widget C, ALTHOUGH Widgets A and B previously had nothing to do with one another? (Remember, we want to try and keep some of that authority the two page have had.) OR do we keep Widget A and Widget B pages "alive", take them off the main navigation, and then put a "disclaimer" on the pages announcing they are now part of Widget C and link to Widget C? OR Should Widgets A and B page be canonicalized to Widget C? Again, keep in mind, widgets A and B previously were not similar, but NOW they are and result in Widget C. (If you are confused, we can provide a REAL work example of what we are talkinga about, but decided to not be specific to our industry for this.) Appreciate any and all thoughts on this.
Technical SEO | | JU19850 -
Pagerank and 301s
Hi all For various reasons some of our pages were renamed from: http://www.meresverige.dk/rejser/malmoe to: http://www.meresverige.dk/rejser/malmo We have made proper 301 redirects and also updated sitemap.xml accordingly. The change was done about 5th of September. The content on the pages remain identical. This page, and all pages below it in the structure now get very low or no page-rank at all. Much lower than it was before the name change. Any ideas to how long, if ever, it will take for Google to transfer the page-rank from the old page? Any suggestions to what we can do to make the process faster?
Technical SEO | | Resultify0 -
Are 301s advisable for low-traffic URL's?
We are using some branded terms in URLs that we have been recently told we need to stop using. If the pages in question get little traffic, so we're not concerned about losing traffic from broken URLs, should we still do 301 redirects for those pages after they are renamed? In other words, are there other serious considerations besides any loss in traffic from direct clicks on those broken URLs that need to be considered? This comes up because we don't have anyone in-house that can do the redirects, so we need to pay our outside web development company. Is it worth it?
Technical SEO | | PGRob0