301 to 404
-
Hello Everybody,
I've got a technical question about server responses. Imagine this scenario:
www.domain.com/not-existing-page/ --> 404 &
domain.com/not-existing-page/ --> www.domain.com/not-existing-page/ --> 404
I use Wordpress for my websites and I can't seem to be able to configure it (or the server where I have total control) to stop it doing this. Ideally, a non-existent url should return 404 instantly, not first redirect to the "corect" url and then return 404.
Anyone experiencing this and can help? Here's a neat tool that allows you to quickly check server response codes - for those of you who are new to this: http://responsetester.appspot.com/
Much appreciated!
Alex
-
404s happen for a lot of reasons, but the only time you need to fix them is when there is a link involved that is pointed to a 404 page.
You then have 4 choices:
- change the link if you have control over it
- create a page there
- 301 the URL to something else
- leave it broken
#1 is the best solution if it's possible. #2 or #3 are acceptable alternatives to me. #4 is unacceptable to me for the sites I manage, but if you have a large or dynamic site where the URLs change frequently, it may be something you have to live with or learn how to handle in a better way (such as a plug-in like Smart404, for a Wordpress site).
As far as whether I'm going to clean up every link to a broken page on my site - I'll absolutely do it if it's a good link, because it's way easier to 301 that link than it is to earn another link elsewhere. If it's a crap link I might not bother.
-
What you're suggesting: "The problem is not the 301, it's the 404. Get rid of it." does not make sense to me.
404 pages happen for lots of reasons and this is normal. It would be nuts to try to "patch" every single one. If the page does not exist, it should return a 404 and that's it.
What if a bunch of people link (mistakingly or not) to a bunch of non-existent pages? You're going to waste your time finding them and creating content for them? ...
-
The first 301 is in place in order to indicate that the www version is the canonical version.
A 301 to a 404 like that isn't an issue - either create a page at /not-existing-page/ or 301 that URL to a correct one. That's it. The problem is not the 301, it's the 404. Get rid of it.
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
-
(Urgent) losing traffic after 301 redirect
We face a seo problem of losing traffic after 301 redirect.We have used 301 redirect from a sub-domain url to main domain, after a few month, we discovered that the traffic in google is dropped 40% as well as yahoo dropped 50% without reason, we have updated sitemap already, but we cannot find any reason for the traffic dropped till now..The original url (more then 5000 links)https://app.example.com/ebook Redirected Urlhttps://www.example.com/ebookThank you for your help!
Intermediate & Advanced SEO | | yukung0 -
Moving half my website to a new website: 301?
Good Morning! We currently have two websites which are driving all of our traffic. Our end goal is to combine the two and fold them into each other. Can I redirect the duplicate content from one domain to our main domain even though the URL's are different. Ill give an example below. (The domains are not the real domains). The CEO does not want to remove the other website entirely yet, but is willing to begin some sort of consolidation process. ABCaddiction.com is the main domain which covers everything from drug addiction to dual diagnosis treatment. ABCdualdiagnosis.com is our secondary website which covers everything as well. Can I redirect the entire drug addiction half of the website to ABCaddiction.com? With the eventual goal of moving everything together.
Intermediate & Advanced SEO | | HashtagHustler0 -
How to set up 301 redirect for URL with question mark
I have encountered some issue with 301 redirect and htaccess file. I need to redirect the following url: http://www.domain.com/?specifications=colours/page/3 to: http://www.domain.com/colours The 301 redirect command I wrote in htaccess file is as follow: Redirect 301 /?specifications=colours/page/3 http://www.domain.com/colours And it doesn't work at the moment. What is the correct way to set up 301 redirect here? Your help will be sincerely appreciated!
Intermediate & Advanced SEO | | robotseo0 -
Are there any negatives to channeling my links through a 301 redirect?
I'm channeling 1000's of links through another url with a 301 redirect. I've thought this through and can't see any downside to doing this, but I want to get your opinion. Can you see any downside to doing this? With regards to passing anchor text, PR, PA, etc? Since this is done with sites all the time when they change urls, I can't see Google being able to penalize me for this....can you? What do you think?
Intermediate & Advanced SEO | | Brian-M0 -
403, 301, 302, 404 errors & possible google penalty
William Rock ran a Xenu site scan on nlpca(dot)com and mentioned the following: ...ran a test with Xenu site scan and it found a lot of broken links with 403, 301, 302, 404 Errors. Other items found: Broken page-local links (also named 'anchors', 'fragmentidentifiers'): http://www.nlpca.com/DCweb/Interesting_NLP_Sites.html#null anchor occurs multiple timeshttp://www.nlpca.com/DCweb/Interesting_NLP_Sites.html#US not found Could somone give us an output of that list, and which ones of these errors do we need to clean up for SEO purposes? Thank you.
Intermediate & Advanced SEO | | BobGW0 -
301 vs. 404
If a listing on a website is no longer available to display is it better to resolve to a 301 redirect or use a 404? I know from an SEO point of view a 301 will pass on the link value, but is that as valuable as saying tto the user hey that page is no lonoger available try something else?
Intermediate & Advanced SEO | | AU-SEO0 -
How long until 301 passes juice to new site?
We put up a new site for an attorney and changed his url along with total redevelopment. We used a 301 for the old to the new and it does resolve to the new. It has been one month and the old site in OSE still shows DA of 37 with PA for homepage of 15. The new site has come up.....to a DA of 6 with homepage at 1 still. For any who might wish it, the referring site is theHollandLawFirm.com and the new site is Houston-Bankruptcy-Attorney.info. Would love to know of any experience with the timing on this.
Intermediate & Advanced SEO | | RobertFisher0 -
Help With Preferred Domain Settings, 301 and Duplicate Content
I've seen some good threads developed on this topic in the Q&A archives, but feel this topic deserves a fresh perspective as many of the discussion were almost 4 years old. My webmaster tools preferred domain setting is currently non www. I didn't set the preferred domain this way, it was like this when I first started using WM tools. However, I have built the majority of my links with the www, which I've always viewed as part of the web address. When I put my site into an SEO Moz campaign it recognized the www version as a subdomain which I thought was strange, but now I realize it's due to the www vs. non www preferred domain distinction. A look at site:mysite.com shows that Google is indexing both the www and non www version of the site. My site appears healthy in terms of traffic, but my sense is that a few technical SEO items are holding me back from a breakthrough. QUESTION to the SEOmoz community: What the hell should I do? Change the preferred domain settings? 301 redirect from non www domain to the www domain? Google suggests this: "Once you've set your preferred domain, you may want to use a 301 redirect to redirect traffic from your non-preferred domain, so that other search engines and visitors know which version you prefer." Any insight would be greatly appreciated.
Intermediate & Advanced SEO | | JSOC1