Wednesday, September 17th, 2008
Ok, this is a pretty simple thing to do and it has some important benefits.
Have you ever visited a website or a web page only to find that annoying “Not Found” error message? If so, what did you do? You probably got ticked off, hit the back button and visited another website. Can you imagine someone coming across a “Not Found” error page on your website? Well, if you don’t have a custom 404 “File Not Found” page set up on your website, that might just be happening.
Here is what you need to do to fix this problem and keep your visitors on your website.
The first thing is to create a web page with some sort of message on it. Something like, “Whoops, looks like the page you are looking for isn’t here. Please click this link to visit our home page or our search page…” You get the idea. You can save the page as “404.php” or something similar and upload it to the root of your web server.
Oh, I forgot to mention this. In order to do what I am suggesting here, you need to be running an Apache web server and your web host has to allow changes to your .htaccess file. I am sure there are other ways to create a custom 404 File Not Found error page and get it up and running, but I am only talking about one way here.
Now, open up your .htaccess file and place this code into it somewhere. I like to place it right on top:
ErrorDocument 404 /404.php
I am using .php extensions for this stuff just because of habit and preference. You can use .html or whatever you wish.
Well, that’s basically it. You can now save your .htaccess file and upload it to the server and go see if it worked. Try typing in some page that you know isn’t there. If it works, please read my previous post about “How To Check Your Web Page HTTP Headers & Response Codes” for some important information.
Good luck.
Related posts
Tags: 404 php, Apache, apache server, apache web server, code, Codes, custom, custom 404, error, error message, ErrorDocument, File, file upload, header, headers, HOST, htaccess file, html, HTTP, link, php, php extensions, Response, response code, root, search, search page, server, web host, web page, website
Posted in Websites | No Comments »
Monday, September 15th, 2008
Today has been an interesting day. We have been taking a look at our websites and searching for duplicate content using Copyscape. After today’s findings, we might just go with Copyscape’s premium service.
Now, let me just tell you that duplicate content is everywhere. Actually, someone has probably written this sentence a million times. What we were searching for today was blatant and far reaching content theft. We found a few instances of one of our homepages and general website idea taken for someone else’s use as well as many instances of interior pages taken. Needless to say, we made screen copies of these cases and sent them to our attorney’s office. These are serious and can’t be ignored.
I would like to talk about two things you can do to help out a more subtle form of duplicate content, on your own website.
The first form of duplicate content on your own website is in the form of www vs. non-www. If you go to your website and type in “www.mysite.com” and then type in “mysite.com,” you may see the same page appear. In the search engine’s eyes, these are two copies of the same page. How do you fix this? It’s easy. Just open up your .htaccess file and type in the following code:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.mysite\.com
RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=permanent,L]
When someone types in “mysite.com” to visit your website, they will automatically be forwarded to “www.mysite.com.” The search engines will be forwarded as well.
Another form of duplicate content on your own website comes in the form of “www.mysite.com/” vs. “www.mysite.com/index.html.” The search engines see this same page as two different ones. What to do? That’s easy too. Just open up your .htaccess again and type in the following code:
RewriteEngine On
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
RewriteRule ^index\.html$ http://www.mysite.com/ [R=301,L]
When someone either types in “www.mysite.com/index.html” or follows a link like that to your website, they will be automatically be forwarded to “www.mysite.com.”
Now, here is the disclaimer. I used this on my server setup and it worked. Please check with your own hosting company to see if something similar will work for your too.
Related posts
Tags: code, content, content theft, copyscape, Duplicate, HOST, htaccess file, html, HTTP, link, REQUEST, RewriteCond, RewriteEngine, RewriteRule, search, search engine, search engines, server, website, Websites, www
Posted in SEO, Websites | 1 Comment »