Solved

Direct certain pages on my site to 404 error page

Posted on 2012-04-10
6
368 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Presenting past 6 months bug 7 29
Create animated movies for web page 18 43
Create tabs to show divs 9 31
Hide Table in merge 3 10
Find out what you should include to make the best professional email signature for your organization.
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

777 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