Re: 301 redirect using html?

Discussion in 'HTML' started by Jukka K. Korpela, Nov 22, 2012.

  1. 2012-11-22 21:20, Jane Galt wrote:

    > Is it possible to do a simple HTML 301 redirect without a htaccess file?


    No, and it's not an HTML redirect but HTTP redirect. Redirection happens
    at the HTTP protocol level and does not even look at the content of
    documents, not to mention parsing HTML there.

    However, there is a special method of fake redirects: if you put a tag like

    <meta http-equiv=Refresh content="0;url=http://www.example.com/foobar">

    then browsers generally redirect to the URL given. But this is not
    observed by proxy caches, search engines, etc.

    If you cannot use .htaccess (it's very simple if it's possible) and you
    resort to this technique, add an explicit link into the content:

    This page has moved to a new address:
    <a href="http://www.example.com/foobar">
    Name of the page here</a>

    This partly helps, in the sense of letting search engines know about the
    new address. But it probably won't make them think it's really the new
    address of the same page, like HTTP redirect would. (This is important,
    because the age of a page is a relevant positive factor.)

    Actually, now looking at
    http://support.google.com/webmasters/bin/answer.py?answer=139394
    I realize that you could additionally use

    <link rel=canonical href="http://www.example.com/foobar">

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Nov 22, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shan Plourde

    Re: 301 redirect to new domain

    Shan Plourde, Jul 23, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    2,290
    Shan Plourde
    Jul 23, 2004
  2. Luigi Donatello Asero

    Redirect 301

    Luigi Donatello Asero, Feb 23, 2006, in forum: HTML
    Replies:
    15
    Views:
    913
    Jonathan N. Little
    Feb 26, 2006
  3. JB
    Replies:
    6
    Views:
    383
    =?iso-8859-1?Q?Kim_Andr=E9_Aker=F8?=
    Nov 22, 2006
  4. frankmcma

    Undo 301 Redirect?...

    frankmcma, Apr 10, 2007, in forum: HTML
    Replies:
    3
    Views:
    9,397
    Jukka K. Korpela
    Apr 11, 2007
  5. Darrel
    Replies:
    11
    Views:
    965
    George Ter-Saakov
    Mar 7, 2008
Loading...

Share This Page