redirect 404 pages to homepage
-
Hello,
I'm puting a new website on a existing domain. In order to not loose the links that point to the varios old url I would like to redirect them to homepage.
The old website was a mess as there was no seo and the pages didn't target any keywords. Thats why I would like to redirect all links to home.
What do you think is the best way to do this ?
I tried to ad this in the .htaccess but it's not working;
ErrorDocument 404 /index.php
Con you tell me how it exacly look?
Now the hole file is like this:
@package Joomla
@copyright Copyright (C) 2005 - 2012 Open Source Matters. All rights reserved.
@license GNU General Public License version 2 or later; see LICENSE.txt
READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
The line just below this section: 'Options +FollowSymLinks' may cause problems
with some server configurations. It is required for use of mod_rewrite, but may already
be set by your server administrator in a way that dissallows changing it in
your .htaccess file. If using it causes your server to error out, comment it out (add # to
beginning of line), reload your site in your browser and test your sef url's. If they work,
it has been set by your server administrator and you do not need it set here.
Can be commented out if causes errors, see notes above.
Options +FollowSymLinks
Mod_rewrite in use.
RewriteEngine On
Begin - Rewrite rules to block out some common exploits.
If you experience problems on your site block out the operations listed below
This attempts to block the most common type of exploit
attempts
to Joomla!Block out any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]([^)]) [OR]
Block out any script that includes a
-
I'm very confused about where the 404 fits in - are these dead pages? To re-capture the link-juice, you'll need to 301-redirect (which it seems like you're also putting into play). In some cases, if the pages are gone or never existed, just let them be gone. If you take every single URL everyone could ever visit to the home-page, you may generate so many 301s that Google starts to get suspicious. We've seen some issues with this lately. In many cases, it's also just not a good user experience.
-
You should have RewriteEngine : RewriteEngine On and you should be able to access the .htaccess
have you tried using any of the tools in the URLs below
http://www.htaccessredirect.net/
&
This site talks about best practices of implementation you really just need to upload it to the FTP once you've made the changes using the tool in the URL above
http://www.ksl-consulting.co.uk/301-redirect-examples.html
Let me know if I can be of more help.
-
Ok, what Thomas is saying I will consider for some special pages but how do I technically do implement the redirects to home in .htaccess
ErrorDocument 404 /index.php is not working for now!
Is it correct?
RewriteEngine : RewriteEngine On
Do I have to ad something else to .htaccess ?
-
I think I have information that may help you Our little more I have comprised a hope will help you.
this tool will help you quite a bit in the described situation
http://www.htaccessredirect.net/
http://www.seomoz.org/blog/how-to-fix-crawl-errors-in-google-webmaster-tools
http://www.tamingthebeast.net/articles3/spiders-301-redirect.htm
404 page should include a link back to the home page or site map of your website so users can quickly get back to what they were searching for. A search box, if you have a site search, is also a good idea to add to a 404 page. Other then that, keep the page minimal, remove distractions and get the user off the 404 error page as quickly as they got on.
Keep in mind most users may not be so savvy when it comes to Internet jargon so simple explanations in English are key! Although, keeping it minimalist does not have to mean "boring". The steps to make a custom 404 page are simple and this site can explain in detail how to create one depending on your server.
301 Redirects
If you have old pages on your website that you want to remove or rename, use a 301 redirect to preserve search engine rankings and pass on backlinks and/or page rank. You can even redirect whole websites into new ones. It is easy to do and is very search engine friendly.
The term "301" stands for "moved permanently". It is created by using a .htaccess file. Follow this guide to learn how to implement many different types of 301 redirects. When pages are deleted instead of redirected with a 301, they turn into 404s (Not Found Pages).
I want to give credit where credit's due this information directly above was referenced from this website http://www.internetmarketingninjas.com/301.html
sincerely,
Thomas von Zickell
-
I would spread the redirects around as much as possible. If you can give link juice to not only your homepage but all pages your page rank and thus Google search rank will increase once the 301 redirects are indexed by Google. I agree strongly with what Sven Witteveen has said below and would be very inclined to agree with him.
I hope I was of some help to you.
Sincerely,
Thomas von Zickell
Blueprint Marketing
-
Thanks for advise but the home url is:
-
Hi Igrizio,
I'm not entirely sure but could it be that you're redirecting to //index.php instead of /index.php?
You can use this website to see the the statuscode and any redirect locations of a website.
Best of luck,
Sven Witteveen
Expand Online
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
-
Pillar pages and blog pages
Hello, I was watching this video about pillar pages https://www.youtube.com/watch?v=Db3TpDZf_to and tried to apply it to my self but find it impossible to do (but maybe I am looking at it the wrong way). Let's say I want to rank on "Normandy bike tou"r. I created a pillar page about "Normandy bike tour" what would be the topics of the subpages boosting that pillar page. I know that it should be questions people have but in the tourism industry they don't have any, they just want us to make them dream !! I though about doing more general blog pages about things such as : Places to rent a bike in Normandy or in XYZ city ? ( related to biking) Or the landing sites in Normandy ? (not related to biking) Is it the way to do it, what do you recommend ? Thank you,
Intermediate & Advanced SEO | | seoanalytics0 -
Duplicate Page getting indexed and not the main page!
Main Page: www.domain.com/service
Intermediate & Advanced SEO | | Ishrat-Khan
Duplicate Page: www.domain.com/products-handler.php/?cat=service 1. My page was getting indexed properly in 2015 as: www.domain.com/service
2. Redesigning done in Aug 2016, a new URL pattern surfaced for my pages with parameter "products-handler"
3. One of my product landing pages had got 301-permanent redirected on the "products-handler" page
MAIN PAGE: www.domain.com/service GETTING REDIRECTED TO: www.domain.com/products-handler.php/?cat=service
4. This redirection was appearing until Nov 2016.
5. I took over the website in 2017, the main page was getting indexed and deindexed on and off.
6. This June it suddenly started showing an index of this page "domain.com/products-handler.php/?cat=service"
7. These "products-handler.php" pages were creating sitewide internal duplicacy, hence I blocked them in robots.
8. Then my page (Main Page: www.domain.com/service) got totally off the Google index Q1) What could be the possible reasons for the creation of these pages?
Q2) How can 301 get placed from main to duplicate URL?
Q3) When I have submitted my main URL multiple times in Search Console, why it doesn't get indexed?
Q4) How can I make Google understand that these URLs are not my preferred URLs?
Q5) How can I permanently remove these (products-handler.php) URLs? All the suggestions and discussions are welcome! Thanks in advance! 🙂0 -
Google cache is showing my UK homepage site instead of the US homepage and ranking the UK site in US
Hi There, When I check the cache of the US website (www.us.allsaints.com) Google returns the UK website. This is also reflected in the US Google Search Results when the UK site ranks for our brand name instead of the US site. The homepage has hreflang tags only on the homepage and the domains have been pointed correctly to the right territories via Google Webmaster Console.This has happened before in 26th July 2015 and was wondering if any had any idea why this is happening or if any one has experienced the same issueFDGjldR
Intermediate & Advanced SEO | | adzhass0 -
404 Errors
Do 404 Errors really have a lot of impact on rankings and over all authority of the site with google? Say you have a site that all the pages have moved apart from the home page which is exactly the same before moving? So most of your pages are showing 404 errros.
Intermediate & Advanced SEO | | summer3000 -
Can Googlebots read canonical tags on pages with javascript redirects?
Hi Moz! We have old locations pages that we can't redirect to the new ones because they have AJAX. To preserve pagerank, we are putting canonical tags on the old location pages. Will Googlebots still read these canonical tags if the pages have a javascript redirect? Thanks for reading!
Intermediate & Advanced SEO | | DA20130 -
Home Page or Internal Page
I have a website that deals with personalized jewelry, and our main keyword is "Name Necklace".
Intermediate & Advanced SEO | | Tiedemann_Anselm
3 mounth ago i added new page: http://www.onecklace.com/name-necklaces/ And from then google index only this page for my main keyword, and not our home page.
Beacuase the page is new, and we didn't have a lot of link to it, our rank is not so well. I'm considering to remove this page (301 to home page), beacause i think that if google index our home page for this keyword it will be better. I'm not sure if this is a good idea, but i know that our home page have a lot of good links and maybe our rank will be higher. Another thing, because google index this internal page for this keyword, it looks like our home page have no main keyword at all. BTW, before i add this page, google index our main page with this keyword. Please advise... U5S8gyS.png j50XHl4.png0 -
Do 404 pages pass link juice? And best practices...
Last year Google said bad links to 404 pages wouldn't hurt your site. Could that still be the case in light of recent Google updates to try and combat spammy links and negative SEO? Can links to 404 pages benefit a website and pass link juice? I'd assume at the very least that any link juice will pass through links FROM the 404 page? Many websites have great 404 pages that get linked to: http://www.opensiteexplorer.org/links?site=http%3A%2F%2Fretardzone.com%2F404 - that was the first of four I checked from the "60 Really Cool...404 Pages" that actually returned the 404 HTTP Status! So apologies if you find the word 'retard' offensive. According to Open Site Explorer it has a decent Page Authority and number of backlinks - but it doesn't show in Google's SERPs. I'd never do it, but if you have a particularly well-linked to 404 page, is there an argument for giving it 200 OK Status? Finally, what are the best practices regarding 404s and address bar links? For example, if
Intermediate & Advanced SEO | | Alex-Harford
www.examplesite.com/3rwdfs returns a 404 error, should I make that redirect to
www.examplesite.com/404 or leave it as is? Redirecting to www.examplesite.com/404 might not be user-friendly as people won't be able to correct the URL in the address bar. But if I have a great 404 page that people link to, I don't want links going to loads of random pages do I? Is either way considered best practice? If I did a 301 redirect I guess it would send the wrong signal to the crawlers? Should I use a 302 redirect, or even a 304 Not Modified redirect?1 -
301 Redirect or Canonical Tag or Leave Them Alone? Different Pages - Similar Content
We currently have 3 different versions of our State Business-for-Sale listings pages - the versions are: **Version 1 -- Preferred Version: ** http://www.businessbroker.net/State/California-Businesses_For_Sale.aspx Title = California Business for Sale Ads - California Businesses for Sale & Business Brokers - Sell a Business on Business Broker Version 2: http://www.businessbroker.net/Businesses_For_Sale-State-California.aspx Title = California Business for Sale | 3124 California Businesses for Sale | BusinessBroker.net Version 3: http://www.businessbroker.net/listings/business_for_sale_california.ihtml Title = California Businesses for Sale at BusinessBroker.net - California Business for Sale While the page titles and meta data are a bit different, the bulk of the page content (which is the listings rendered) are identical. We were wondering if it would make good sense to either (A) 301 redirect Versions 2 and 3 to the preferred Version 1 page or (B) put Canonical Tags on Versions 2 and 3 labeling Version 1 as the preferred version. We have this issue for all 50 U.S. States -- I've mentioned California here but the same applies for Alabama through Wyoming - same issue. Given that there are 3 different flavors and all are showing up in the Search Results -- some on the same 1st page of results -- which probably is a good thing for now -- should we do a 301 redirect or a Canonical Tag on Versions 2 and 3? Seems like with Google cracking down on duplicate content, it might be wise to be proactive. Any thoughts or suggestions would be greatly appreciated! Thanks. Matt M
Intermediate & Advanced SEO | | MWM37720