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
-
Subdomain redirect
Hey guys, I was thinking about creating subdomains for one of my websites. I want to divide my website in different subdomains (blog.[site].com / directory.[site].com / etc.) but I'm afraid that this will negatively impact my rankings. My blog for example has a lot of supporting content for my products and services that are primarily hosted on the homepage. Have you guys ever created subdomains at a later stage of your website's existence? What kind of impact did you notice? Would you recommend it? Thanks a million!
Technical SEO | | Nizar.1 -
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 -
404 Errors for Form Generated Pages - No index, no follow or 301 redirect
Hi there I wonder if someone can help me out and provide the best solution for a problem with form generated pages. I have blocked the search results pages from being indexed by using the 'no index' tag, and I wondered if I should take this approach for the following pages. I have seen a huge increase in 404 errors since the new site structure and forms being filled in. This is because every time a form is filled in, this generates a new page, which only Google Search Console is reporting as a 404. Whilst some 404's can be explained and resolved, I wondered what is best to prevent Google from crawling these pages, like this: mydomain.com/webapp/wcs/stores/servlet/TopCategoriesDisplay?langId=-1&storeId=90&catalogId=1008&homePage=Y Implement 301 redirect using rules, which will mean that all these pages will redirect to the homepage. Whilst in theory this will protect any linked to pages, it does not resolve this issue of why GSC is recording as 404's in the first place. Also could come across to Google as 100,000+ redirected links, which might look spammy. Place No index tag on these pages too, so they will not get picked up, in the same way the search result pages are not being indexed. Block in robots - this will prevent any 'result' pages being crawled, which will improve the crawl time currently being taken up. However, I'm not entirely sure if the block will be possible? I would need to block anything after the domain/webapp/wcs/stores/servlet/TopCategoriesDisplay?. Hopefully this is possible? The no index tag will take time to set up, as needs to be scheduled in with development team, but the robots.txt will be an quicker fix as this can be done in GSC. I really appreciate any feedback on this one. Many thanks
Technical SEO | | Ric_McHale0 -
Odd 404 pages
Evening all, I've performed a Screaming Frog technical crawl of a site, and it's returning links like this as 404s: http://clientsite.co.uk/accidents-caused-by-colleagues/js/modernizr-2.0.6.min.js Now, I recognise that Modernizr is used for detecting features in the user's browser - but why would it have created an indexed page that no longer exists? Would you leave them as is? 410 them? Or do something else entirely? Thanks for reading, I look forward to hearing your thoughts! Kind regards, John.
Technical SEO | | Muhammad-Isap0 -
Client error 404 pages!
I have a number of 404 pages coming up which are left over in Google from the clients previous site. How do I get them out of Google please?
Technical SEO | | PeterC-B0 -
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 -
Subdomains & SEO
Exact match domains are great for ranking but what about domains which contain just half of the full phrase being targeted? eg. If you owned the domain rentals.co.uk but wanted to target the search term "car rentals" Regarding backlinks, would it be best to link back to your rentals.co.uk homepage (using anchor text "car rentals") or to one of the following: a) www.rentals.co.uk/car-rentals b) car.rentals.co.uk AND 301 redirect to www.rentals.co.uk c) car.rentals.co.uk AND 301 redirect to www.rentals.co.uk/car-rentals
Technical SEO | | martyc1 -
301 Redirects Change?
Hi, Mozzers- I've noticed pages that are getting 301 redirected are staying out there longer. It used to be that you would implement a 301 redirect and then after a couple of months the old page would disappear out of Google's index. Over the last couple of months I've noticed pages lingering, popping up.... What gives? Thanks in advance! LHC
Technical SEO | | lhc670