Welcome to WebmasterWorld Guest from 54.205.119.93

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

How To Update Permanent Redirect for index.html

   
1:59 am on Dec 23, 2012 (gmt 0)



Hello ~ Getting below message from a link checker and can't figure out how to fix.

List of redirects
The links below are not broken, but the document does not use the exact URL, and the links were redirected. It may be a good idea to link to the final location, for the sake of speed.

warning Lines: 98, 104 http://www.example.com/index.html redirected to http://www.example.com/
Status: 301 -> 200 OK

This is a permanent redirect. The link should be updated.


This is the link referenced above:
<a href="index.html">Home</a>&nbsp;&nbsp;


What's weird is I have this exact link in 3 places on that page yet it's only one of them that I'm getting the above message for (line 98) and only for my home page (index.html) although link is part of my navigation at bottom of ALL of my website pages.
..........................

In case you need to see, below is part of what I have in my htaccess file:

# keeps index.html part of url hidden
# always keep above canonical code
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.html\ HTTP/
RewriteRule ^(([^/]+/)*)index\.html http://www.example.com/$1 [R=301,L]

# canonical always to www
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
4:09 am on Dec 23, 2012 (gmt 0)

WebmasterWorld Administrator 5+ Year Member Top Contributors Of The Month



Your link should be
<a href="http://www.example.com/">Home</a>&nbsp;&nbsp;


You're forcing an extra rewrite by using the page name that you have redirected.
5:31 am on Dec 23, 2012 (gmt 0)



Thank you. That fixed it. Thought I had tried that but must have done something wrong before.

Should I change my index.html link to the full url on JUST my home page or everywhere on ALL MY PAGES?

Just my home page - correct?
5:41 am on Dec 23, 2012 (gmt 0)

WebmasterWorld Administrator 5+ Year Member Top Contributors Of The Month



No, it needs to be changed everywhere. If Google finds a link they want to try to index it and you don't want them seeing the same page with 2 different URLs.
4:01 pm on Dec 23, 2012 (gmt 0)



Well, this has been invaluable information since it means that every single one of my website pages is wrong.

In the process of fixing now. A BIG thank you.
6:17 pm on Dec 23, 2012 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Clicking a link in internal navigation should never result in a redirect. The link should point to the real URL.

The redirects in htaccess are for when other sites link to the wrong version.
7:04 pm on Dec 23, 2012 (gmt 0)



The link should point to the real URL.

Not sure I understand. Are you disagreeing with the response I was given above?

To me the REAL URL is actually http://www.example.com/index.html. Is that what I should change that link to?

INSTEAD OF
http://www.example.com/
I should change to
http://www.example.com/index.html
instead?
.................
Sorry - I truly believe I can learn anything but I'm oftentimes a little slow...
8:57 pm on Dec 23, 2012 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



URLs are "used out" there on the web.

Filenames are used "here" inside the server.

The two are not at all the same thing, they are merely related by the actions of the server configuration.

The real URL is "http://www.example.com/".

The real internal reference is "/index.html".

People out there "on the web" use a web-based reference system: URLs. They have no need to know what the files inside the server are called.

However, if people do directly request those internal resources, you should redirect the request to tell them to request the correct URL.
10:57 pm on Dec 23, 2012 (gmt 0)



Got it -
http://www.example.com/
is correct.

You were just explaining further...

Thank you.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month