-1

Making updates on my website, there are a lot of pages that I don't use left. So I delete them. Unfortunately some slight idexing has been made by search engine so when u type the name of website of mine it appears non more existent pages too in browser results.

I need to create a custum 404 page not found that appears everytime people go on pages that doesn't exist, respecting google SEO policy and w3c standards.

Unfortunately I can't.

Someone could teach me please?

3
  • Do you have access to your .htaccess file?
    – KiaShakiba
    Apr 30, 2014 at 16:56
  • I have access to every file on my main root, unfortunately there any .htaccess file iside it. :\ May I made it? Apr 30, 2014 at 17:00
  • Take a look at this: htaccess files
    – KiaShakiba
    Apr 30, 2014 at 18:23

2 Answers 2

1

Make a .html document in your webserver or website's directory in the htdocs then make a new folder that is called "err", then upload all your Error pages like 404, The page cannot be found or 403, Forbidden. Then place those files in the err folder and re-name them to the error codes. If you are using cPanel then search (Using the search bar) or find (By browsing the tools listed) Error Pages. Go from there with the instructions given on cPanel.

Hope this helps you, Jay Salway (13 year old developer)

0

Create a static page containing your custom message and anything else you want (eg. site layout etc.) and save it somewhere appropriate within your site (eg. from the root: /errors/404.asp). Within that page make sure you write a 404 response header (eg. Response.Status = "404 Page Not found")

In IIS (the option will also be available somewhere similar under Apache if you are running that) open up the settings for your website and choose 'Error Pages' then look for the status code 404 (by default there should be one but you may need to create it) open that up and choose the option 'Execute a URL on this site' and enter the url chosen above /error/404.asp)

1
  • R Grove, could you write for me here, please, an example of the code of 404 page not found? I am not interested about the layout but to the code relative to the response status. Thanks! May 5, 2014 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.