|
| |
|
|
pimpernel
Posts: 55 Joined: 6/17/2003 Status: offline
|
Creating HTTP 301 redirect - 12/30/2004 12:46:28
Hi. Apologies if this is on the wrong board. About 8 weeks ago I published a newly designed site to replace my original one. The URL is the same as it was but unfortunately, whereas my original home page was default.htm I was advised to name my new home page index.htm for publishing purposes. Now I find that some keyword searches on Google are bringing up my original home page complete with the default.htm, so naturally because that page no longer exists it is a dead link. The other pages on my site still retain the same names so visitors end up at the correct page anyway so no problem there. It's only the old home page creating the problem. Am hoping that eventually IF and when my new home page is crawled and If it appears on Google then the old links may die out but am not confident. I am told to use HTTP 301 redirect but surely that is impossible because there is no such page in my site named 'default.htm anymore. The people who link to me all use the .com URL they do not use the default or the index htm so that is not a problem. If anyone can advise me further I would be very grateful. Perhaps I should sit tight and be patient?? Thank you and best wishes for 2005
|
|
|
|
dpf
Posts: 7121 Joined: 11/12/2003 From: India-napolis Status: offline
|
RE: Creating HTTP 301 redirect - 12/30/2004 12:55:03
quote:
whereas my original home page was default.htm I was advised to name my new home page index.htm for publishing purposes just curious - why did they say you "had to" change it? default is perfectly legit.
_____________________________
Dan
|
|
|
|
pimpernel
Posts: 55 Joined: 6/17/2003 Status: offline
|
RE: Creating HTTP 301 redirect - 12/30/2004 13:44:06
Hi Dan. I had a few problems when I published my original site and finally it could only be corrected by renaming my home page. This time I thought I would be prepared so enquired in advance what my home page should be called. If I remember correctly the list I was given showed index.htm as the preferred choice with default.html lower down on the list. I do not think default.htm was there. With hindsight I should have kept default but to be on the safe side and because of my inexperience with such matters I played safe. More fool me!! Cheers
|
|
|
|
Reflect
Posts: 4767 From: USA Status: offline
|
RE: Creating HTTP 301 redirect - 12/30/2004 13:44:42
Create a blank page called default.htm. Then implement the following... http://www.seoconsultants.com/tips/asp/301.asp This will redirect the SE spider to the correct page. Take care, Brian
_____________________________
|
|
|
|
dpf
Posts: 7121 Joined: 11/12/2003 From: India-napolis Status: offline
|
RE: Creating HTTP 301 redirect - 12/30/2004 14:26:38
i guess it is that simple, i was thinking something along those lines but kept quiet cause i wasnt sure..we all learn sometimes.. but as to keeping the page - yes. as long as its being picked up in SE
_____________________________
Dan
|
|
|
|
Reflect
Posts: 4767 From: USA Status: offline
|
RE: Creating HTTP 301 redirect - 12/30/2004 16:20:31
Yes, keep the page temporarily. Once you see default fall in the SERPS then remove it. Take care, Brian
_____________________________
|
|
|
|
BobbyDouglas
Posts: 5432 Joined: 5/15/2003 From: Arizona Status: online
|
RE: Creating HTTP 301 redirect - 12/30/2004 17:22:45
Brian, I have noticed this takes a couple months to see results from the 301. What have you experienced with this?
_____________________________
Arizona Web Design - Mr Bobs Web Design in Arizona The Arizona Web Hosting Challenge
|
|
|
|
pimpernel
Posts: 55 Joined: 6/17/2003 Status: offline
|
RE: Creating HTTP 301 redirect - 12/30/2004 17:59:48
This probably seems a very basic and stupid question. The old non-existant page causing the problem was "http:www.myurl.com/default.htm" Can I confirm that the redirect 301 HTTP address (the "Location") will be: "http:www.myurl.com/index.asp as opposed to /index.htm Presumably my dead link OUGHT to disappear from Google eventually anyway (whether I do the HTTP 301 redirect or not)? Hopefully by that time my correct new page with new tags etc will have appeared in the listing. Patience is indeed a virtue! Thanks everyone.
|
|
|
|
Reflect
Posts: 4767 From: USA Status: offline
|
RE: Creating HTTP 301 redirect - 1/4/2005 14:08:20
quote:
Can I confirm that the redirect 301 HTTP address (the "Location") will be: "http:www.myurl.com/index.asp as opposed to /index.htm That can only be confirmed by you and your host. With IIS you can specify .htm/.html/.asp as being the default via your host or your control panel access. quote:
Presumably my dead link OUGHT to disappear from Google eventually anyway (whether I do the HTTP 301 redirect or not)? Hopefully by that time my correct new page with new tags etc will have appeared in the listing. Correct or you can request a removal here... http://www.google.com/remove.html#exclude_pages quote:
I have noticed this takes a couple months to see results from the 301. What have you experienced with this? Been too long to remember I did this around one year ago when making a lot of changes for a client. Back then it took around 1 to two months, might have been the timing of the crawl. Take care, Brian
_____________________________
|
|
|
|
pageoneresults
Posts: 1001 From: Orange, CA USA Status: offline
|
RE: Creating HTTP 301 redirect - 1/5/2005 11:51:23
quote:
Create a blank page called default.htm. Then implement the following... http://www.seoconsultants.com/tips/asp/301.asp This will redirect the SE spider to the correct page. I've got to correct something here. The above method only works with .asp pages. The asp code for the redirect will not work on an .htm or .html page. You would have been better off to have kept the default.htm for your root level page. Why? Because there may be many inbound links that use a full URI including the /default.htm file reference. This can be a real pain as I'm about to explain. When you change anything with a file name, extension, underlying technology, etc., you have to be careful that you put something in place to capture those visitors visiting an old URI reference. URI stands for Uniform Resource Identifier and is used in place of URL which has been deprecated (in the specifications). Anyway, back to the topic... When you are building your site, one thing you want to absolutely make sure of, is that you don't link to root level pages. For example, here is how a link would be constructed for your home page... http://www.example.com/ Here is how a link would be constructed for a home page in a sub-directory... http://www.example.com/sub/ Notice that I did not include the index.htm or whatever the home page may be called. You can literally name that root level page anything as long as your host has made certain changes in IIS to reflect that. I prefer index.asp or index.htm. They are the simplest and shortest of the available options and are pretty much the standard these days. So what may have happened in this case is that you had internal links within your site that pointed to /default.htm. Many times you will see your search engine listing with this full URI. You don't want that! You want that root address pointing to http://www.example.com/ Follow me on all of this? ;) Now, to address your issue. The best thing would be to have the host install ISAPI_Rewrite and then you can drop an ini file in your root that will handle this with no problems. Or, ask your host what type of solution they can provide for you in this particular case. From my perspective, the ini file is absolutely the best option. 2nd best option would be to have the host set up a 301 for you through IIS.
_____________________________
SEO Consultants Directory Find Search Engine Marketing Companies
|
|
|
|
dpf
Posts: 7121 Joined: 11/12/2003 From: India-napolis Status: offline
|
RE: Creating HTTP 301 redirect - 1/5/2005 11:53:27
quote:
ini file can you describe that in more detail please.
_____________________________
Dan
|
|
|
|
davids
Posts: 211 Joined: 1/26/2003 From: Belgium (American) Status: offline
|
RE: Creating HTTP 301 redirect - 1/5/2005 11:53:33
Many thanks, Brian! I've been looking for that for quite a while.
_____________________________
Davids International Relocation Technology
|
|
|
|
pageoneresults
Posts: 1001 From: Orange, CA USA Status: offline
|
RE: Creating HTTP 301 redirect - 1/5/2005 12:02:12
quote:
Can you describe that in more detail please. With ISAPI_Rewrite, there is a global .ini file that is installed at the root of the server. The host can do a variety of things with this file or they can just leave it be. After that global ini file is installed, now each and every site on that server can used the httpd.ini file which is similar to Apache's mod_rewrite. They both function the same way and use Regular Expressions. Unfortunately the above method is not going to be available to most as many hosts are fearful of installing anything on their Windows Server like this. What they fail to realize is that the ISAPI filter causes no harm if configured properly. It requires someone with the knowledge of writing Regular Expressions and rewrite routines.
_____________________________
SEO Consultants Directory Find Search Engine Marketing Companies
|
|
|
|
pageoneresults
Posts: 1001 From: Orange, CA USA Status: offline
|
RE: Creating HTTP 301 redirect - 1/5/2005 12:07:12
Here's an example of one line that would go in the .ini file to address this particular issue... RewriteRule /default.htm http://www.example.com/ [I,O,RP,L]
_____________________________
SEO Consultants Directory Find Search Engine Marketing Companies
|
|
|
|
minstrel
Posts: 7 Joined: 4/6/2004 Status: offline
|
RE: Creating HTTP 301 redirect - 1/5/2005 12:08:58
quote:
ORIGINAL: jaybee Can I ask why you're using all of that rather than the Meta Tag? <meta http-equiv="refresh" content="5; url=http://www.yourweb.com/~username/filename.html"> This redirects in 5 seconds. Change to 0 for instant. This will work but do NOT use a value less than 10 -- and definitely do NOT use 0 -- this may be interpreted by some search engines as "cloaking". Create a page as follows: [CODE]<HTML> <HEAD> <META HTTP-EQUIV="REFRESH" CONTENT="10; URL=http://www.yourdomain.com/newpage.html"> <TITLE>This page has moved</TITLE> </head> <BODY> <P>This Page Has Moved<BR> Please update your bookmarks to <A href="http://www.yourdomain.com/newpage.html"> http://www.yourdomain.com/newpage.html</A> </p> </body> </html>[/CODE] Alternate methods for redirect: 1. if your host allows an .htaccess file (Unix/Linux/Apache), you can use a 301 redirect: [CODE]Redirect 301 /oldpage.html http://www.yoursite.com/newpage.html[/CODE] or [CODE]Redirect permanent /oldpage.html http://www.yoursite.com/newpage.html[/CODE] Or this will redirect ALL pages from an old site to a new site: [CODE]redirect 301 / http://www.yourdomain.com/[/CODE] 2. 301 redirect in PHP To use the following PHP code you must change the file extension of the file you will be using to index.php instead of index.html. Now put the following code into your new index.php page, put ONLY this code, no need for <head>, <body> or any other tags. Change www.newdomain.com/page.html to the url the page will be redirecting to <?php header("HTTP/1.1 301 Moved Permanently"); header("Location: http://www.newdomain.com/page.html"); exit(); ?> 3. 301 redirect in ASP: To use the following ASP code you must change the file extension of the file you will be using to default.asp instead of default.html. Now put the following code into your new default.asp page, put ONLY this code, no need for <head>, <body> or any other tags. Change www.newdomain.com/page.html to the url the page will be redirecting to <% response.Status = "301 Moved Permanently" response.addheader "location", "http://www.newdomain.com/page.html" response.end %>
|
|
|
|
dpf
Posts: 7121 Joined: 11/12/2003 From: India-napolis Status: offline
|
RE: Creating HTTP 301 redirect - 1/5/2005 14:41:06
quote:
Regular Expressions ty..just curious- are those the same or similar Regular Expressions I learned in Javascript?
_____________________________
Dan
|
|
|
|
pageoneresults
Posts: 1001 From: Orange, CA USA Status: offline
|
RE: Creating HTTP 301 redirect - 1/5/2005 22:37:12
quote:
I've never had to use redirects but I'm modding a big site at the moment using SSIs and will have to change all the page names to shtml from html. Why do you have to do that? I do believe you can handle the interpretation of shtml to html at the server level. You shouldn't have to switch any file extensions to shtml. Or at least I don't think so... I've only worked with FP, asp and a few php include methods.
_____________________________
SEO Consultants Directory Find Search Engine Marketing Companies
|
|
|
|
minstrel
Posts: 7 Joined: 4/6/2004 Status: offline
|
RE: Creating HTTP 301 redirect - 1/5/2005 22:42:42
It may depend on the host. One of my sites was previously hosted on a server where they required shtml for SSIs.
|
|
|
|
pageoneresults
Posts: 1001 From: Orange, CA USA Status: offline
|
RE: Creating HTTP 301 redirect - 1/5/2005 22:45:16
quote:
ty..just curious- are those the same or similar Regular Expressions I learned in Javascript? I think so. Regular Expressions are Regular Expressions, aren't they? :) Here are a few ISAPI Rewrite Tips that we have published that are related to this topic. One thing I did forget to mention, with ISAPI_Rewrite installed (the global .ini), each site can now have it's own httpd.ini file. The .ini files are controlled at the root level of each site so the host need not get involved if you know what you are doing. There is a generated .txt log file of any errors that may occur which are usually none if done correctly.
_____________________________
SEO Consultants Directory Find Search Engine Marketing Companies
|
|
|
|
pageoneresults
Posts: 1001 From: Orange, CA USA Status: offline
|
RE: Creating HTTP 301 redirect - 1/6/2005 6:38:50
quote:
I must admit I'd rather they stayed as html if they can but as the site is over 500 pages includes are becoming a must. Can you use FP Includes?
_____________________________
SEO Consultants Directory Find Search Engine Marketing Companies
|
|
|
|
pageoneresults
Posts: 1001 From: Orange, CA USA Status: offline
|
RE: Creating HTTP 301 redirect - 1/6/2005 8:03:53
Server Side Includes quote:
Most servers can be configured to "parse" documents that end with .shtml or .shtm file extensions for special commands before sending pages back to clients. Server administrator can also configure servers to parse all .html or .htm files.
_____________________________
SEO Consultants Directory Find Search Engine Marketing Companies
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|