Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Direct certain pages on my site to 404 error page

Posted on 2012-04-10
6
Medium Priority
?
387 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 800 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
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!

 

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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
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 basics of jQuery including how to code hide show and toggles. 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…
Suggested Courses

782 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