Solved

Direct certain pages on my site to 404 error page

Posted on 2012-04-10
6
364 Views
Last Modified: 2012-04-24
In my Google webmasters account I have Soft Errors and it says "The target URL does not exist and your server is not returning a 404 (file not found) error. "  How do I redirect these pages to a 404 Error page?
0
Comment
Question by:livewirewebsolutions
  • 3
  • 3
6 Comments
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 200 total points
ID: 37828753
Create a page with the not found message on it, and save it as 404.html then put a file named .htaccess in the root directory that contains:

ErrorDocument 404 http://yoursitename.com/404.html


Cd&
0
 

Author Comment

by:livewirewebsolutions
ID: 37843964
Hi COBO,

I have done this and my 404 error page works but somehow these pages are not producing the 404 error pages.

The site has classified listings of machines.  When you go to a machine the url is mydomain.com/ad/4159.  However, machines are sold and deleted but somehow people find the links on google or something and click on them.  The page no longer is available but the 404 error is not produced.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 37852115
Is your 404.html in the root directory? if not you will need to give the full path to it.


Cd&
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:livewirewebsolutions
ID: 37852237
my 404 page is here - http://www.cluemachines.com/404.shtml which is in the root directory, no?
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 37852293
ErrorDocument 404 http://www.cluemachines.com/404.shtml
should work assuming the server is normally parsing shtml pages.

Cd&
0
 

Author Comment

by:livewirewebsolutions
ID: 37852363
No worries.  I will try to talk with the developer.  Thanks.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Wondering how you can get your new website ranking on Google Search so that people find you online?  The answer is Search Engine Optimization (SEO). So how do you Start Ranking a New site with SEO?  Below is a starter guide to get your new website S…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to count occurrences of each item in an array.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now