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
-
Redirection chain and Javascript Redirect
Hi, A redirection chain is usually defined as a page redirecting to another page which itself is another redirection. URL1 ---(301/302)---> URL2 ---(301/302)---> URL3 But what about Javascript redirect? They seem to be a different beast: URL1 ---(301/302)---> URL2 ---(200 then Javascript redirect)---> URL3 From what I know if the javascript redirect is instant Google counts it as a 301 permanent redirection, but I'm still not sure about if this counts as a redirection chain. Most of the tools (such as moz) only see the first redirection. So is that scenario a redirection chain or no?
Technical SEO | | LouisPortier0 -
How to avoid a redirect chain?
Hi there, I am aware that it is not good practice to have a redirect chain but I am not really sure hoe to do it (on Apache). I have multiple redirects in a chain because on the one hand I had to redirect because the content of the site got a new URL and because on the other hand I changed from http to https. Thus I have a chain like http://example.com via 301 to http://the-best-example.com via 301 to https://the-best-example.com via 301 to https://greatest-example.com Obviously I want to clean this up without loosing any link juice or visitors who had bookmarked my site. So, I could make three separate redirects: http://example.com via 301 to https://greatest-example.com
Technical SEO | | netzkern_AG
http://the-best-example.com via 301 to https://greatest-example.com
https://the-best-example.com via 301 to https://greatest-example.com But is there a way to combine it? Can I use an "OR" operator to link the 3 conditions to this one rule? Any other suggestions? Thanks a lot!!!0 -
301 Redirects in subfolders
Hi, we're making our site into a static site but I would like to transfer the Google juice. Most of the links and database exist on subfolders though. Could I simply do 301 redirects on the subfolders and retain the value or does it have to be on the full domain?
Technical SEO | | Therealmattyd0 -
Server redirect query
Hi there, due to so much traffic coming through to our e-commerce site our host is going to do an apache re-direct for over flow traffic from www.mywebsite.com to a ww2.mywebsite.com canonical tags will be in, but if there is a re-direct this is surely bad for seo, telling on onccasions the page has moved? Any advice on this and the best way to re-direct users when there is too much traffic please let me know.
Technical SEO | | pauledwards0 -
Why Canonical error?
I just got my SEOMOZ run and it says I have a CANONICAL ERROR: Scorpio Earrings - 7mm Stud - Sterling Silver http://www.astrojewelry.com/jewelry/scorpio-the-scorpion-earrings-30502.htm I'm not sure why--I only changed the <title>tag--not the URL.</span></p> <p><span class="truncated sub-url" title="http://www.astrojewelry.com/jewelry/scorpio-the-scorpion-earrings-30502.htm">Why would this generate a canonical error?</span></p> <p><span class="truncated sub-url" title="http://www.astrojewelry.com/jewelry/scorpio-the-scorpion-earrings-30502.htm">Kathleen</span></p> <p><span class="truncated sub-url" title="http://www.astrojewelry.com/jewelry/scorpio-the-scorpion-earrings-30502.htm">astrojewelry.com</span></p> <p> </p> <p> </p></title>
Technical SEO | | spkcp1110 -
301 redirects and seo..
I bought a domain and it has nice traffic. It only has about 5 main pages in php When i got the site i switched to html because php was overkill. I did the 301 and google deleted the php files and replaced with html version when i check site:domain.com It has been about 7 days. I DID NOT use 301 for each of the 5 pages to go php to html instead is used this code RewriteEngine On
Technical SEO | | samerk
RewriteCond %{HTTP_HOST} ^mydomain.com
RewriteRule (.) http://www.mydomain.com/$1 [R=301,L]
RedirectMatch 301 (.).php$ http://www.mydomain.com$1.html So basically if you load php it will load the html version. dog.php > dog.html Is this OKAY? or should it be done differently.... worried! Thanks !0 -
406 errors
Just started seeing 406 errors on our last crawl (all jpg related). Seomoz found 670 of these on my site when there were 0 before. I have checked the MIME and everything seems to be in the right order. So could it be that Seomoz-crawler is showing errors that aren't really errors?
Technical SEO | | smines0 -
301 Redirect Questions
I have a site I built on a wisiwig editing platform that will not allow a 301 redirect. The site has already been remade and I need to point it to another domain. To do the redirect, can I change it to another domain host that will allow a 301 or will that make me loose the authority of the site? I may not be able to move the content of the site. Please help.
Technical SEO | | photoseo10