Redirects & 404 Errors
-
Hi everyone,
I'm probably missing some GLARING error here, but I'm hoping you can help me! We recently built a new website on Wordpress and attempted to use a redirect plugin to take care of some old pages. The issue we are having though, is that when you click an old link you are not automatically redirected and instead are given a 404 error page. Then, when you try to view another page (by clicking a navigation item), every pages shows a 404 error. I implemented a redirect plugin, however it seems to start to work then still throws the 404 page.
I believe this has something to do with the htaccess file which has the standard WP rewrite info in there...
The way the old site was setup was kind of janky, so wondering if it's on that side or if I'm just going crazy. An old URL example would be http://orchards inn.com/index.php/specials and the new page is http://orchardsinn.com/special-offers. Sometimes the redirect seems to work, and others it actually throws a 404 page, then every other page in the navigation is 404'd as well.
Your help is GREATLY appreciated!!
-
Awesome Dan, thanks again for helping me out!
I implemented what you suggested and I'm still having the same issue. I think it has to do with the way the old URLs were setup, which included "index.php" before every folder (i.e. http://orchardsinn.com/index.php/specials)
When I implement the redirect:
Redirect 301 /specials/ http://www.orchardsinn.com/special-offers/
Then clear my cache and attempt to click the old link, it takes me to the site with a 404 error page. Then, when I try to navigate to another page via the navigation, they all return 404 errors.
Any thoughts?
-
Hey There
Yes that looks like the right format for 301. Make sure you're putting that below the default wordpress stuff.
If you want to redirect a bunch of pages all to one page you just do it like this;
Redirect 301 /photos-1/ http://www.orchardsinn.com/new-page/
Redirect 301 /photos-2/ http://www.orchardsinn.com/new-page/
Redirect 301 /photos-3/ http://www.orchardsinn.com/new-page/
etc...
-
Hi Dan,
Thank you so much for taking the time to be so thorough in your answer! I really appreciate it. I attempted the htaccess redirects a little while back, but maybe I was doing them wrong. I have all of the old URLs in a csv, and they will all need to be redirected to new pages on the new site.
When I do the redirects in htaccess, they should look like this, correct?
Redirect 301 /specials/ http://www.orchardsinn.com/special-offers/
Also, If I have a few old pages (i.e. old photo gallery pages or a contact page), how can I redirect them all to the same new page? I think that was where I was having issues, but couldn't figure out what to do.
Again, I really appreciate your help, so thanks in advance!
-
Hmmm this could be tricky once it's starts becoming unclear what redirects were done where etc. I'd take a clean slate approach - note that to do this you have to have the OLD URLs somewhere - either in analytics, an old crawl, archive.org, webmaster tools etc;
- Gather up ALL old URLs from the sources listed above (old crawls, analytics, webmaster tools etc)
- Prepare any 301 redirects you need. I recommend using the .htaccess file. It's much easier to keep track of and have it all in once place.
- Disable the redirect plugin
- Remove any redirects from .htaccess
- Test the site to make sure they are all gone
- Put your new redirects all back into the .htaccess file
Now in theory you should have redirects ONLY in the .htaccess file. Test the site by crawling it. Test some of the old URLs and make sure they redirect.cYou can also put your old back links into Screaming Frog in list mode and check them.
I find the redirect plugin is OK but it's best to shut off any automatic creation of redirects.
-
Hi, can you please tell us your URL so we can look closer?
It appears to be the plugin you are using, probably you need to fix some parts of the code, I'm shooting to guess here... but you can probably set some redirect rules before the wordpress's rules to manage the old pages and then remove the plugin, which is causing the 404s on the 404s.
Hope that helps.
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
-
Redirect chain error free htaccess code for website
i want to redirect domain, example.com to https://www.example.com, is anyone can help me to provide redirect chain error free ht-access code. I implemented this htaccess code on the website and mhy site show on the moz redirect chain error RewriteCond %{HTTP_HOST} !=""
Technical SEO | | truehab
RewriteCond %{THE_REQUEST} ^[A-Z]+\s//+(.)\sHTTP/[0-9.]+$ [OR]
RewriteCond %{THE_REQUEST} ^[A-Z]+\s(./)/+\sHTTP/[0-9.]+$
RewriteRule .* http://%{HTTP_HOST}/%1 [R=301,L]0 -
I have a question about the impact of a root domain redirect on site-wide redirects and slugs.
I have a question about the impact (if any) of site-wide redirects for DNS/hosting change purposes. I am preparing to redirect the domain for a site I manage from https://siteImanage.com to https://www.siteImanage.com. Traffic to the site currently redirects in reverse, from https://www.siteImanage.com to https://siteImanage.com. Based on my research, I understand that making this change should not affect the site’s excellent SEO as long as my canonical tags are updated and a 301 redirect is in place. But I wanted to make sure there wasn’t a potential consequence of this switch I’m not considering. Because this redirect lives at the root of all the site’s slugs and existing redirects, will it technically produce a redirect chain or a redirect loop? If it does, is that problematic? Thanks for your input!
Technical SEO | | mollykathariner_ms0 -
301 Redirects
Hi, We have migrated to a new domain name and I wrote my redirects as follows: Redirect 301 / http://www.healthpointe.net Redirect 301 /urgent_care_locations.shtml http://www.healthpointe.net/healthpointe-locations/ Redirect 301 /locations.shtml http://www.healthpointe.net/healthpointe-locations/ Redirect 301 /career_client_relations_rep.shtml http://www.healthpointe.net/careers/ My issue is that when I include the first redirect, which is to the main page of the website that the other redirects stop working. Any idea what the problem could be?
Technical SEO | | healthpointeseo0 -
Tracing Redirects to a Site
I wonder if anyone has used any tools where you can trace the redirects pointing to a site? I know there are a number of tools out there that can be used to check where a URL redirects to, but I was wondering if anyone has used a tool where I could trace all redirects with the final URL? I am using this for competitor research so I don't have access to Analytics or Webmaster Tools.
Technical SEO | | BeattieGroup0 -
How big is the problem: 404-errors as result of out of stock products?
We had a discussion about the importance of 404-errors as result of products which are out of stock. Of course this is not good, but what is the leverance in terms of importance: low-medium-high?
Technical SEO | | Digital-DMG0 -
Why can't I redirect 302 errors to 301's?
I've been advised by IT that due to the structure of our website (they don't use sub-folders) it's not possible to change 302's to 301's. Is this correct, or am I being fobbed off?
Technical SEO | | lindsaytuerena0 -
How to avoid 404 errors when taking a page off?
So... We are running a blog that was supposed to have great content. Working at SEO for a while, I discovered that is too much keyword stuffing and some SEO shits for wordpress, that was supposed to rank better. In fact. That worked, but I'm not getting the risk of getting slaped by the Google puppy-panda. So we decided to restard our blog from zero and make a better try. So. Every page was already ranking in Google. SEOMoz didn't make the crawl yet, but I'm really sure that the crawlers would say that there is a lot of 404 errors. My question is: can I avoid these errors with some tool in Google Webmasters in sitemaps, or shoud I make some rel=canonicals or 301 redirects. Does Google penalyses me for that? It's kinda obvious for me that the answer is YES. Please, help 😉
Technical SEO | | ivan.precisodisso0 -
301-redirect
Hi My website is fairly new and i wasnt aware of the difference btw 'website.com' and 'www.website.com' when i started up. It doesnt matter which one i use as long as i am consistent right ? Most of my ingoing links are to mainpage on 'website.com'. I have som ingoing links to 'www.website.com' but also some to 'www.website.com/brandname'. is it enough to 301-redir 'www.website.com' to 'website.com' or does it need to be done on several levels ? I need to have someone do the redirect for me - how can i check its working when its done ? Dan Lærum
Technical SEO | | danlae0