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
-
404s on subfolder - how to redirect?
Hi all,
Technical SEO | | MFSMarketing
we have a lot of 404s to subfolders. Eg
www.website.com/blog-post-title/imagename/
www.website.com/blog-post-title/author/ We don't have these subfolders or blog posts anymore.
How do i redirect them? These links (404s) don't seem to have any value or backlinks. Thanks,
Stef0 -
Hundreds of 404 errors are showing up for pages that never existed
For our site, Google is suddenly reporting hundreds of 404 errors, but the pages they are reporting never existed. The links Google shows are clearly spam style, but the website hasn't been hacked. This happened a few weeks ago, and after a couple days they disappeared from WMT. What's the deal? Screen-Shot-2016-02-29-at-9.35.18-AM.png
Technical SEO | | MichaelGregory0 -
Google not using redirect
We have a GEO-IP redirect in place for our domain, so that users are pointed to the subfolder relevant for their region, e.g: Visit example.com from the UK and you will be redirected to example.com/uk This works fine when you manually type the domain into your browser, however if you search for the site and come to example.com, you end up at example.com I didn't think this was too much of an issue but our subfolders /uk and /au are not getting ranked at all in Google, even for branded keywords. I'm wondering if the fact that Google isn't picking up the redirect means that the pages aren't being indexed properly? Conversely our US region (example.com/us) is being ranked well. Has anyone encountered a similar issue?
Technical SEO | | ahyde0 -
What is the difference between 301 redirect to 404 vs just 404.
A bunch of pages on my site are set to 301 redirect to our 404 page. Intuitively, I feel like they should all just 404 from the page's url and not redirect to the 404 page. How do I explain to my developer that they should not redirects but should just 404? Is there much of a difference between the redirect first vs 404 first? Thanks!
Technical SEO | | gaytravel0 -
I have custom 404 page and getting so much 404 error on Google webmaster, what should i do?
I have a custom 404 page with popular post and category links in the page, everyday i have 404 crawl error on webmaster tools, what should i do?
Technical SEO | | rimon56930 -
"/blogroll" causing 404 error
I'm running a campaign, and the crawling report for my site returned a lot of 4xx errors. When I look at the URLs, they all have a "/blogroll" in the end, like: mysite.com/post-number-1/blogroll mysite.com/post-number-2/blogroll And so on, for pretty much all the pages. The thing is, I removed the blogroll widget completely, so I really wouldn't know what can possibly point to links like that. Is there anything to fix on the site? Thanks
Technical SEO | | Baffo0 -
301 redirects and OSE
We run a blog/video real estate site (yochicago.com) as one of the venues for sponsored content for our clients looking for off-page SEO and inbound links. I'm working with a client who we've linked to a handful of times in the last few weeks, but I'm not seeing any external links from our site on PRO/OSE. Come to find that our writer has been linking to http://clientsite.com, instead of http://www.clientsite.com, which is the canonical site. I wouldn't have thought that this would make a difference, and about an hour of web research seems to confirm that it shouldn't make a difference, save for losing a little bit of SEO credit. What am I missing? Any input would be appreciated.
Technical SEO | | mikescotty0