Solved

Direct certain pages on my site to 404 error page

Posted on 2012-04-10
6
371 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this blog, I will share you some basic tips for content marketing and to rank your website on Google.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
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…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

751 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