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
-
Google Search Console 'Change of Address' Just 301s on source domain?
Hi all. New here, so please be gentle. 🙂 I've developed a new site, where my client also wanted to rebrand from .co.nz to .nz On the source (co.nz) domain, I've setup a load of 301 redirects to the relevant new page on the new domain (the URL structure is changing as well).
Technical SEO | | WebGuyNZ
E.G. On the old domain: https://www.mysite.co.nz/myonlinestore/t-shirt.html
In the HTACCESS on the old/source domain, I've setup 301's (using RewriteRule).
So that when **https://www.mysite.co.nz/**myonlinestore/t-shirt.html is accessed, it does a 301 to;
https://mysite.nz/shop/clothes/t-shirt All these 301's are working fine. I've checked in dev tools and a 301 is being returned. My question is, is having the 301's just on the source domain only enough, in regards to starting a 'Change of Address' in Google's Search Console? Their wording indicates it's enough but I'm concerned, maybe I also need redirects on the target domain as well? I.E. Does the Search Console Change of Address process work this way?
It looks at the source domain URL (that's already in Google's index), sees the 301 then updates the index (and hopefully pass the link juice) to the new URL. Also, I've setup both source and target Search Console properties as Domain Properties. Does that mean I no longer need to specify that the source and target properties are HTTP or HTTPS? I couldn't see that option when I created the properties. Thanks!0 -
Do 301s still work after hosting is discontinued?
I am in the process of phasing out a website that has been acquired by another company. Its web pages are being 301 redirected to their counterparts on the website of the company that has acquired them. How long should I maintain the hosting of the phased out website? Technically, do 301s still work after the hosting has been discontinued? Thanks, Caro
Technical SEO | | Caro-O0 -
301s - A Year Late
A website I recently was asked to help with was redesigned last year, but no 301s were setup. Looking at the old URLs 95% of the ones from early 2013 are 404s. Their traffic dropped from 50,000 per month to 10,000 and I believe this is one of the reasons. Now the question is: a year later, will it do any good to setup 301 redirects from those old urls. My current thought is that the old URLs have probably lost any link juice they had. But it should hurt anything to setup the 301s anyway. Any thoughts on whether this is worth my time and effort?
Technical SEO | | jkosarek0 -
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 -
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 -
Masses (5,168 issues found) of Duplicate content.
Hi Mozzers, I have a site that has returned 5,168 issues with duplicate content. Where would you start? I started sorting via High page Authority first the highest being 28 all the way down to 1. I did want to use the rel=canonical tag as the site has many redirects already. The duplicates are caused by various category and cross category pages and search results such as ....page/1?show=2&sort=rand. I was thinking of going down the lines of a URL rewrite and changing the search anyway. Is it work redirecting everything in terms of results versus the effort of changing all the 5,168 issues? Thanks sm
Technical SEO | | Metropolis0 -
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 there any SEO implications if a page does two 301s and then a 304?
Curious to see if this is a positive or negative thing for SEO...or even perhaps, neutral. h9SZz
Technical SEO | | RodrigoStockebrand0