Solved

Direct certain pages on my site to 404 error page

Posted on 2012-04-10
6
367 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

919 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

18 Experts available now in Live!

Get 1:1 Help Now