473,395 Members | 1,574 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

syntax for http 301

hi, i'm trying to update the pages of an old website so that they use
http 301 to redirect to the new website, instead of http-equiv=
"refresh" (which search engines do not follow and thus get stuck at the
old site)
Here is the code currently redirecting clients to the new site (it's
the same for every page on the old site, just tweaked a little
obviously for specific destinations), could someone show me how to
easily modify it as I would like? I'm not very familiar with the
syntax, thanks in advance.

<HTML>
<HEAD>
<META HTTP-EQUIV="refresh" content="0;URL=http://www.newsite.com
">
<TITLE>Page has moved</TITLE>
</HEAD>
<BODY>
If your browser does not automatically redirect you, click <A
HREF="http://www.newsite.com
">here</A> to go to the new page.
</BODY>
</HTML>

Jul 24 '05 #1
16 1817
ni*****@wtexec.com wrote:
hi, i'm trying to update the pages of an old website so that they use
http 301 to redirect to the new website, instead of http-equiv=
"refresh" (which search engines do not follow and thus get stuck at the
old site)


That's an HTTP issue, not an HTML issue. How you do it depends on your
server.
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 24 '05 #2
On 19 Jul 2005 13:51:09 -0700, ni*****@wtexec.com wrote:
hi, i'm trying to update the pages of an old website so that they use
http 301 to redirect to the new website, instead of http-equiv=
"refresh" (which search engines do not follow and thus get stuck at the
old site)


[HTML code snipped]

You need to do the redirect in your server, not in HTML. (As you
observed, search engines won't pick up on an HTTP-refresh.)

The specific nature of the redirect command depends on what server
you're running. For instance, on an Apache server you would put a
RedirectPermanent line into your .htaccess file in root Web
directory.

http://httpd.apache.org/docs/mod/mod_alias.html#redirectperm

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/2003/05/05/why_we_wont_help_you
Jul 24 '05 #3
JRS: In article <11**********************@o13g2000cwo.googlegroups .com>
, dated Tue, 19 Jul 2005 13:51:09, seen in news:comp.infosystems.www.aut
horing.html, ni*****@wtexec.com posted :
hi, i'm trying to update the pages of an old website so that they use
http 301 to redirect to the new website, instead of http-equiv=
"refresh" (which search engines do not follow and thus get stuck at the
old site)

Does that really matter, so long as there is a route from one page that
the search engines will know of to every other page using only standard
<a href="...">...</a> links, for which one can either connect one prime
page to all others or connect the pages in a ring?

(That says nothing against using 301 for other reasons.)

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 24 '05 #4
On Wed, 20 Jul 2005 15:45:27 +0100, Dr John Stockton
<jr*@merlyn.demon.co.uk> wrote:
Does that really matter,


Yes

(but if you don't get it by now, you never will)

Jul 24 '05 #5
JRS: In article <j8********************************@4ax.com>, dated
Thu, 21 Jul 2005 00:24:32, seen in news:comp.infosystems.www.authoring.h
tml, Andy Dingley <di*****@codesmiths.com> posted :
On Wed, 20 Jul 2005 15:45:27 +0100, Dr John Stockton
<jr*@merlyn.demon.co.uk> wrote:
Does that really matter,


Yes


And your reasons for saying that are ... ?

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 24 '05 #6
On Wed, 20 Jul 2005, Dr John Stockton wrote:
In article <11**********************@o13g2000cwo.googlegroups .com>
, dated Tue, 19 Jul 2005 13:51:09, seen in news:comp.infosystems.www.aut
horing.html, ni*****@wtexec.com posted :
hi, i'm trying to update the pages of an old website so that they use
http 301 to redirect to the new website, instead of http-equiv=
"refresh" (which search engines do not follow and thus get stuck at the
old site)

That's the right answer, and, as others have mentioned already, it's
typically done by configuration entries in the web server.
Does that really matter,
Yes.
so long as there is a route from one page that the search engines
will know of to every other page using only standard <a
href="...">...</a> links, for which one can either connect one prime
page to all others or connect the pages in a ring?
If I was in business, I'd be only too happy to have my competitors
shooting themselves in the foot by doing that when they really needed
a permanent redirection. Oh, it's a WAI issue, too.

The questioner evidently wants to phase out the old server pages.
(That says nothing against using 301 for other reasons.)


I say that 301 is the correct answer to the problem as stated. If you
think the problem is something else, perhaps you'd care to say what
you think the problem is.
Jul 24 '05 #7
JRS: In article <Pi*******************************@ppepc56.ph.gla. ac.uk
, dated Sat, 23 Jul 2005 13:43:23, seen in news:comp.infosystems.www.au thoring.html, Alan J. Flavell <fl*****@ph.gla.ac.uk> posted :On Wed, 20 Jul 2005, Dr John Stockton wrote:
In article <11**********************@o13g2000cwo.googlegroups .com>
, dated Tue, 19 Jul 2005 13:51:09, seen in news:comp.infosystems.www.aut
horing.html, ni*****@wtexec.com posted :
>hi, i'm trying to update the pages of an old website so that they use
>http 301 to redirect to the new website, instead of http-equiv=
>"refresh" (which search engines do not follow and thus get stuck at the
>old site)


That's the right answer, and, as others have mentioned already, it's
typically done by configuration entries in the web server.
Does that really matter,


Yes.
so long as there is a route from one page that the search engines
will know of to every other page using only standard <a
href="...">...</a> links, for which one can either connect one prime
page to all others or connect the pages in a ring?


If I was in business, I'd be only too happy to have my competitors
shooting themselves in the foot by doing that when they really needed
a permanent redirection. Oh, it's a WAI issue, too.

The questioner evidently wants to phase out the old server pages.
(That says nothing against using 301 for other reasons.)


I say that 301 is the correct answer to the problem as stated. If you
think the problem is something else, perhaps you'd care to say what
you think the problem is.

Evidently I did not make it clear enough that I intended to imply
nothing about the use of 301. Remember, though, that some site hosts do
not offer 301 facilities - mine, for example - so there is reason to
consider the non-301 situation.

I was considering only whether a search engine would index a page to
which those calling for the page at its previous location are redirected
by http-equiv=refresh rather than by 301. I understand that search
engines do not follow the http-equiv=refresh route.

However, the new page will still be found by the engines if there is a
normal <a href="http://...">text</a> link to it from a page that they do
know about; and if the new site has all its pages connected by a ring of
normal links, then it will all be found for indexing. A normal link on
the redirecting pages themselves will suffice.
BTW, how often do search engines look at known pages? Google found, in
my uksumtim.htm, the recent addition of "Sunday" before "1915-09-26"
rather rapidly (a day or so); but that may have been a fluke.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 24 '05 #8
Tim
On Sat, 23 Jul 2005 21:51:42 +0100, Dr John Stockton wrote:
Evidently I did not make it clear enough that I intended to imply
nothing about the use of 301. Remember, though, that facilities - mine,
for example - so there is reason to consider the non-301 situation.
Have you directly asked them? Hosts may not make things available to
users to configure, but if you asked them to wildcard 301 all requests to
your old address to a new homepage, they might oblige.

Not doing it properly, will, of course, not do the job properly. As the
thread has already said.
However, the new page will still be found by the engines if there is a
normal <a href="http://...">text</a> link to it from a page that they do
know about; and if the new site has all its pages connected by a ring of
normal links, then it will all be found for indexing. A normal link on
the redirecting pages themselves will suffice.
Yes, sort of. It'll be found, *eventually* catalogued if considered
worthy, and old non-functional addresses will get purged, *eventually*.
But without using the proper HTTP responses codes the delay may be worse
than you want to put up with. And searchers might land at your old
defunct site, give up, never trying your replacement.
BTW, how often do search engines look at known pages?


See <http://www.google.com/webmasters/> for some clues. But anything else
will be guesswork on our behalves. We don't know what companies do, nor
when they change their policies.

--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary). But please reply to the group, like you're supposed to.

This message was sent without a virus, please delete some files yourself.

Jul 24 '05 #9
On Sat, 23 Jul 2005 21:51:42 +0100, Dr John Stockton
<jr*@merlyn.demon.co.uk> wrote:
Alan wrote...
I say that 301 is the correct answer to the problem as stated. If you
think the problem is something else, perhaps you'd care to say what
you think the problem is.
Evidently I did not make it clear enough that I intended to imply
nothing about the use of 301. Remember, though, that some site hosts do
not offer 301 facilities - mine, for example..


At more than one time you have been adv iced not to shell out your money
to someone that refuse to give you options that you are entitled to on
Internet.

There is a standard for the HTTP, hosting companies should adhere to
that standard, or die (read; go bankrupt).
- so there is reason to consider the non-301 situation.
No there is not. Change to a host that allows for standards.

[...]
However, the new page will still be found by the engines if there is a
normal <a href="http://...">text</a> link to it from a page that they do
know about; and if the new site has all its pages connected by a ring of
normal links, then it will all be found for indexing. A normal link on
the redirecting pages themselves will suffice.
There's a lot more to this than what meets the eye at first; but I leave
it up to you to dig into the details of that for now.
BTW, how often do search engines look at known pages?


Only search engine programmers can tell for sure but basically any SE
knows that it can start looking at IP address 0.0.0.0 and work its way
up to 255.255.255.255 and then restart at zero again.

In between it will find literally many many millions of links that
qualifies an IP address with a host name to make it different from other
places using a numeric IP address that has already been looked at.

Two to three weeks turn around time for Google looks like an average, as
seen from my own work on the www.

--
Rex
Jul 24 '05 #10
In article <an********************************@4ax.com>,
Jan Roland Eriksson <jr****@newsguy.com> wrote:
Only search engine programmers can tell for sure but basically any SE
knows that it can start looking at IP address 0.0.0.0 and work its way
up to 255.255.255.255 and then restart at zero again.
I doubt that Web search engines scan IP addresses like that.
Two to three weeks turn around time for Google looks like an average, as
seen from my own work on the www.


Googlebot seems to visit each page on my site at least once a day.

--
Henri Sivonen
hs******@iki.fi
http://hsivonen.iki.fi/
Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html
Jul 24 '05 #11
On Sun, 24 Jul 2005 10:14:23 +0300, Henri Sivonen <hs******@iki.fi>
wrote:
In article <an********************************@4ax.com>,
Jan Roland Eriksson <jr****@newsguy.com> wrote:
...start looking at IP address 0.0.0.0 and work its way
up to 255.255.255.255 and then restart at zero again.


I doubt that Web search engines scan IP addresses like that.


Me too, but that's still the primary range of available addresses.
Two to three weeks turn around time for Google looks like an average, as
seen from my own work on the www.


Googlebot seems to visit each page on my site at least once a day.


Being visited and being properly indexed is not necessarily the same
thing. Don't confuse referral visits with the bots own indexing work.

--
Rex
Jul 24 '05 #12
JRS: In article <pa****************************@mail.localhost.inv alid>
, dated Sun, 24 Jul 2005 09:50:35, seen in news:comp.infosystems.www.aut
horing.html, Tim <ti*@mail.localhost.invalid> posted :
On Sat, 23 Jul 2005 21:51:42 +0100, Dr John Stockton wrote:
Evidently I did not make it clear enough that I intended to imply
nothing about the use of 301. Remember, though, that facilities - mine,
for example - so there is reason to consider the non-301 situation.


Have you directly asked them? Hosts may not make things available to
users to configure, but if you asked them to wildcard 301 all requests to
your old address to a new homepage, they might oblige.


Given their explicitly stated policy with this class of account, it
seems pointless to do so.

I wrote "... some site hosts do not offer 301 facilities - mine, for
example ..." in the hope that readers would realise that my host does
not offer me that; however, my point remains valid if there are any
hosts at all that do not offer it.

--
© John Stockton, Surrey, UK. ??*@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Check boilerplate spelling -- error is a public sign of incompetence.
Never fully trust an article from a poster who gives no full real name.
Jul 24 '05 #13
JRS: In article <an********************************@4ax.com>, dated
Sun, 24 Jul 2005 03:19:55, seen in news:comp.infosystems.www.authoring.h
tml, Jan Roland Eriksson <jr****@newsguy.com> posted :
On Sat, 23 Jul 2005 21:51:42 +0100, Dr John Stockton
<jr*@merlyn.demon.co.uk> wrote:
Alan wrote...
I say that 301 is the correct answer to the problem as stated. If you
think the problem is something else, perhaps you'd care to say what
you think the problem is.
Evidently I did not make it clear enough that I intended to imply
nothing about the use of 301. Remember, though, that some site hosts do
not offer 301 facilities - mine, for example..


At more than one time you have been adv iced not to shell out your money
to someone that refuse to give you options that you are entitled to on
Internet.


I buy what I need : there is no entitlement to get the other contracting
party to provide what it does not want to for the price. However, that
does not matter; my point applies independently of what a particular
service offers.
Only search engine programmers can tell for sure but basically any SE
knows that it can start looking at IP address 0.0.0.0 and work its way
up to 255.255.255.255 and then restart at zero again.

In between it will find literally many many millions of links that
qualifies an IP address with a host name to make it different from other
places using a numeric IP address that has already been looked at.

From plans stated by my ISP, I rather suggest that such a method would
not work for sites that it hosts. Demon dial-up users are independent
internet hosts, each with an assigned dotted quad, so I *could* run a
Web server myself; but that would be silly, since it would only be
accessible for a small fraction of the time. IIRC, our actual Demon Web
sites are hosted in a cunning manner not requiring another IP address
for each user. Therefore, our sites would not all be found that way.

That way should also fail to find sites without a default index page in
the root directory.
My understanding is that engines search by following links on pages they
already know of; that means that when Google started it must have been
provided manually with at least one link to get it started.

You could test by setting up a page at a new IP address, telling no-one
about it, and seeing whether Google finds it.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 24 '05 #14
On Sun, 24 Jul 2005 21:15:15 +0100, Dr John Stockton
<jr*@merlyn.demon.co.uk> wrote:
I buy what I need : there is no entitlement to get the other contracting
party to provide what it does not want to for the price. However, that
does not matter; my point applies independently of what a particular
service offers.


Your point appears to be that even though the proper way to do a
redirect is with a 301, you prefer doing business with providers
that won't do it.

Why keep on with this? Are you really expecting ANYONE to agree with
you?

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you
Jul 25 '05 #15
"Dr John Stockton" wrote:
I buy what I need


Then shop around -- you're getting seriously ripped off by demon.net

--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/
Jul 25 '05 #16
JRS: In article <il********************************@4ax.com>, dated
Mon, 25 Jul 2005 01:21:46, seen in news:comp.infosystems.www.authoring.h
tml, Stan Brown <th************@fastmail.fm> posted :
On Sun, 24 Jul 2005 21:15:15 +0100, Dr John Stockton
<jr*@merlyn.demon.co.uk> wrote:
I buy what I need : there is no entitlement to get the other contracting
party to provide what it does not want to for the price. However, that
does not matter; my point applies independently of what a particular
service offers.


Your point appears to be that even though the proper way to do a
redirect is with a 301, you prefer doing business with providers
that won't do it.

Why keep on with this? Are you really expecting ANYONE to agree with
you?


Not really, since the regulars habitually do not think about what they
are responding to, but air their prejudices with the greatest possible
speed.

I do not need to do 301 redirection myself, so that aspect of your
comment is mere irrelevance.

Those whose systems do not follow such <META HTTP-EQUIV="REFRESH"
as I do use will, if even moderately intelligent, be able to find what
they wanted by way of the home page. or by the plain link which I always
provide in the rump of the original page; if they are not sufficiently
intelligent, or cannot be bothered, I really do not care.

But what I was hoping that you would realise and accept, my original
point, is that the previously-presented argument that one must use 301
redirection for search engines to find the new page is fallacious; it is
only true to say that they will not find the new page by following <META
HTTP-EQUIV="REFRESH" (that is their choice, I suppose). If the new page
is also linked to by ordinary links, the new page will be found, and it
seems will be found reasonably soon.

A valid conclusion should not be bolstered by an unsound argument.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 25 '05 #17

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Phil Powell | last post by:
I'm not kidding, the only reason yesterday you didn't hear from me was because I wasn't coding, but today I am doing something quick, and yes, as always it failed.. right at the SQL statement: ...
699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
303
by: mike420 | last post by:
In the context of LATEX, some Pythonista asked what the big successes of Lisp were. I think there were at least three *big* successes. a. orbitz.com web site uses Lisp for algorithms, etc. b....
22
by: Tuang | last post by:
I'm checking out Python as a candidate for replacing Perl as my "Swiss Army knife" tool. The longer I can remember the syntax for performing a task, the more likely I am to use it on the spot if...
7
by: Steven Bethard | last post by:
So here's the state of the decorator debate as I see it: *** Location GvR pretty strongly wants decorators before the function: ...
0
by: Henri Sivonen | last post by:
I have written a servlet wrapper and a custom entity resolver for Jing. My code needs to decide whether to instantiate a compact syntax schema reader or an XML syntax schema reader. I would very...
19
by: Nicolas Fleury | last post by:
Hi everyone, I would to know what do you think of this PEP. Any comment welcomed (even about English mistakes). PEP: XXX Title: Specialization Syntax Version: $Revision: 1.10 $...
3
by: Manuel | last post by:
I'm trying to compile glut 3.7.6 (dowbloaded from official site)using devc++. So I've imported the glut32.dsp into devc++, included manually some headers, and start to compile. It return a very...
12
by: Yusuf | last post by:
I'm sorry for the second post in as many hours, and both about structs. The code below compiles. The variables test1 and test2 are structures of datatype teststruct1 and teststruct2. The size of...
20
by: W Karas | last post by:
Would the fear factor for concepts be slightly reduced if, instead of: concept C<typename T> { typename T::S; int T::mem(); int nonmem(); };
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.