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
-
Redirecting issue
Please I have a domain name miaroseworld.com I redirected (301 redirect) it to one of my domain names and I am having issues with the website so I decided to redirect to to my new site but moz is still showing redirecty to the previous websites
Technical SEO | | UniversalBlog
Even when I change the redirect on search console it still showing redirecting to the previous site.0 -
Hi anyone please help I use this code but now getting 404 error. please help.
#index redirect
Technical SEO | | roynguyen
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index.html\ HTTP/
RewriteRule ^index.html$ http://domain.com/ [R=301,L]
RewriteCond %{THE_REQUEST} .html
RewriteRule ^(.*).html$ /$1 [R=301,L] hi anyone please help I use this code but now getting 404 error. please help. homepage and service.html page is working, but the rest pages like about.html, servicearea.html, and contact.html is not working showing 404 error. and also when you type this URL. generalapplianceserice.ca/about.html generalapplianceserice.ca/contact.html generalapplianceserice.ca/servicearea.html it automatically remove the .HTML extension and shows 404 error, the pages name in root directory is same. these pages work like generalapplianceservice.ca and generalapplianceservice.ca/services why? i also remove this code again but still same issue.0 -
Switched from and HTTPS to HTTP. My home page is facing a redirect issue from the http to https. Should I no index the HTTP or find the redirect and delete it? Thank you
Switched from and HTTPS to HTTP. My home page is facing a redirect issue from the http to https. Should I no index the HTTP or find the redirect and delete it? Thank you
Technical SEO | | LandmarkRecovery20170 -
60,000 404 errors
Do 404 errors on a large scale really matter? I'm just aware that I now have over 60,000 and was wondering if the community think that I should address them by putting 301 redirects in place. Thanks
Technical SEO | | the-gate-films0 -
GWT giving me 404 errors based on old and deleted site map
I'm getting a bunch of 404 crawl errors in my Google Webmaster Tools because we just moved our site to a new platform with new URL structure. We 301 redirected all the relevant pages. We submitted a new site map and then deleted all the site maps to the old website url structure. However, google keeps crawling the OLD urls and reporting back the 404 errors. It says that the website is linking to these 404 pages via an old outdated sitemap (which if you goto shows a 404 as well, so it's not as if Google is reading these old site maps now). Instead it's as if Google has cached the old sitemap but continues to use it to crawl these non-existent pages. Any thoughts?
Technical SEO | | Santaur0 -
Help with strange 404 Errors.
For the most part I have never had trouble tracking down 404's. Usually it's simply a broken link, but lately I have been getting these strange errors http://gridironexperts.com/http%3A/www.nfl.com/gamecenter?game_id=29528&season=2008&displayPage=tab_gamecenter/ What does; %C2%94 repersent? The error always points to NFL.com, but we don't link to them...like ever? Can I just 404: http://gridironexperts.com// to fix the problem, as all 404's start with this weird %C2%94 error. Is this error even on my site? Is in the backend...virus? thanks -Mike
Technical SEO | | MikePatch0 -
Redirect blogspot blog ?
Hi We have an ecom site selling childrens clothing. We startet up with a blogspot blog due to the lack of that option from our provider. I have a few links in to the blogspot blog and realized today that the PA is 39 - the PA of homepage of ecom site is 40. Ive lately been using the ..../blog on my ecom site. The functionality so far of it is so bad that i am considering using the blogspot blog again. How can i best utilize the strength of our blog at blogspot. Just keep posting w anchor text to relevant pages our main site? Is redirecting a possibility at all ? Dan Lærum
Technical SEO | | danlae0 -
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