301 redirects
-
Hello,
I want to ditch about 1000 pages of a 2000+ page site. I believe the 301 redirect thing is the way to go but my expertise is limited. Is there a way to do a blanket redirect ie if a user or search engine looks for a page thats not there it all gets redirected to the index page or do I have to do each one manually?
Thanks
Ian
-
ok thanks
-
you can point example.com to any directory you wish...
and they should be on seperate lines, not sure why moz changes that
RewriteEngine on RewriteBase /
RewriteRule ^gallery/(.*) http://www.example.com/ [R=301,L]
-
Hello Andy,
Thanks for that.
I have most of it in a directory so just so I know I've got it right... in the htaccess file I put a line:
RewriteEngine on RewriteBase / RewriteRule ^gallery/(.*) http://www.example.com/ [R=301,L]
Where /gallery is the directory to be moved, will send everything from the directory (including stuff in subdirectories) to the index page? I do have a corresponding new gallery but the file names are different.
Cheers
-
this depends how your site is set up ... for example if you are redirecting a directory (eg .com/blog/) to your root thats easy enough to do - but if they are specific files that don't have within say the root or a folder you are not redirecting in it's entirety it would be manual work I am afraid. - see below
The other option is to drop to 404 page if you are just removing the content and not redirecting to relevant content ... admitting a page is missing and hasn't been replaced is sometimes the best way to show you are working on your site and consolidating info to be valuable to users. Also you can use your 404 page to have a big of fun and explain to users why something has gone missing or changed - or even just have a search box there.
_RewriteEngine on RewriteBase / RewriteRule ^old_dir/(.*) http://www.example.com/new_dir/ [R=301,L]_
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
-
Is it possible to avoid redirect of penalties for 301 forwards?
We have been doing a good amount of competitive research lately and have noticed sites that have been changing their TTLD quite often to escape manual penalties / DCMA filings. An example evolution: brandterm.com -> brandterm.bz -> brandterm.me These competitors are able to quickly rank for money keywords in the top 3 soon after another domain switch. What we have noticed is that while its obvious they received Google penalties they continue to 301 redirect the old domains to the new ones. We have experienced first hand that penalties travel along domains with 301 redirects. Does anyone have an explanation how these companies are able to achieve quickly high volume of organic search while 301-redirecting from burnt domains? The only option I see is to disavow all previous domains in GWT to be able to employ 301 redirects without risking carrying over the penalty. Are there other theories ppl can think of? T
Intermediate & Advanced SEO | | petersocapro0 -
Blog tags are creating excessive duplicate content...should we use rel canonicals or 301 redirects?
We are having an issue with our cilent's blog creating excessive duplicate content via blog tags. The duplicate webpages from tags offer absolutely no value (we can't even see the tag). Should we just 301 redirect the tagged page or use a rel canonical?
Intermediate & Advanced SEO | | VanguardCommunications0 -
301 page into a 404
Hi I have a job board site and the way the site is built means that I cant 404 job pages once they have expired. To combat this Im looking to 301 the pages into a 404 page.Do any of you have any experience with this? Are there any potential pitfalls to doing a 404 this way? Thanks
Intermediate & Advanced SEO | | AndrewAkesson0 -
404 ? 301 ? What is your opinion ?
Hi, I have a classifieds website and I am wondering about the life of a page with an ad. An announcement has therefore a limited life, so : Is a 404 pages? a 301 redirect to the section? let the content without redirection? What is your opinion? Sorry for my english, i'm french 😉 Thanks. A.
Intermediate & Advanced SEO | | android_lyon0 -
Ranking EMD to 301 for branding is it better to leave it as or 301 it?
We have a client about to enroll with us for SEO. The client has about 50 EMD sites, out of which 9 are ranking. An EMD has [Exact] match anchoring naturally, the sites in question are all EMDs the link profiles show it. The client wants to 301 the EMDs to a brand page.. We would want to 301, 9 EMD sites to the new site. Here is the thing, if the site domain has an exact match to the anchor text profile, when we 301 the page to www.brand.com/EMD will the link profile matter? One of the EMDs is on page one spot 2 if we do this change, will Google look at the new brand page (www.brand.com/EMD) as an unnatural link profile?
Intermediate & Advanced SEO | | Bryan_Loconto0 -
301 Redirect To Another 301 Redirect
Hi, We have a client with an old domain that they want to redirect to their primary domain. They also have a few older domains pointing to the old domain. Do you recommend leaving them as redirects that point to the old domain? This will create a redirect to a redirect situation. Or, is it better to go ahead and redirect those older domains to the primary one's, removing one layer of redirect? Thank you! Jessie
Intermediate & Advanced SEO | | JessieT0 -
Redirection not working
http://elmanarah.com/ to http://www.elmanarah.com/ I have mistakenly created 5 databases for one wordpress installation.In order to get rid of them I mistakenly even deleted the right one.Now created the new one but the URL is showing with www Even now if It type in http://elmanarah.com/ it sends me to http://www.elmanarah.com/ I also check in URL D.A and P.A in OSE it shows like I have redirected it fine.Can anyone Check in and guide me either I have done it right and It pass on my previous work effort or it was total loss for me?
Intermediate & Advanced SEO | | csfarnsworth0 -
Does 301 Redirect works on social signals?
Hello, I'm considering strategic change in my site's formation.
Intermediate & Advanced SEO | | BeytzNet
301 redirecting some of the pages is not a problem but the question remains - what will happen with all of my social signals? These pages have Likes, plus ones, and tweets. Thanks0