Tekststørrelse
PC - Hold Ctrl-tasten nede og trykk på "+" for å forstørre eller "-" for å forminske.
MAC - Hold cmd-tasten (Command) nede og trykk på "+" for å forstørre eller "-" for å forminske.
EN
×
Lukk
Lumino - veibeskrivelse
(0)
Toggle navigation
Forsiden
Digital design
Netthandel
SEO
Referanser
Publiseringssystem
Oversettelse
Om Lumino
Webdesign blogg
SEO blogg
Tech blogg
Personvern
Nettleseren din må oppgraderes. Du har Internet Explorer version {%ieversion%}. Gå til
www.microsoft.com
for å laste ned siste versjon av Internet Explorer.
Tech blogg
Search Engine Optimization, 301 Moved Permanently
Ever wondered how to automatically redirect from one URL to another - and to do this without getting penalized by the search engine?
Well, it's pretty easy - read on for an explanation and code example...
First of all, always use the "301 Moved Permanently" feature to redirect a page from the old location to the new. Otherwise, you may experience a huge downward leap in search engine rankings, 302 hijacking penalties, or other penalties from the search engine. Do not use JavaScript or client-side redirects as these often will be misinterpreted by search engines and cause penalties.
The most common use for the 301 redirect, which all site owners need these days, is the redirect from the "non-www" version of the site's
URL
to the "www" one (for example, http://mydomain.com/ to http://www.mydomain.com/). This helps prevent the 302 hijacking.
Insert the code below into your Global.asax, and you are all set :)
protected
void
Application_BeginRequest(
Object
sender,
EventArgs
e)
{
if
(
HttpContext
.Current.Request.Url.ToString().ToLower().Contains("
http://yourdomain.no
"))
{
HttpContext
.Current.Response.Status =
"301 Moved Permanently"
;
HttpContext
.Current.Response.AddHeader(
"Location"
, Request.Url.ToString().ToLower().Replace("
http://yourdomain.no"
, "
http://www.yourdomain.no
"));
}
}
You may of course also use the above code to redirect from any page to another. For example, you could use the above code to replace a certain string in your URL with another string. I.e., your old web page has the URL
http://www.nordiccab.com/vis.aspx?MenuID=241
and you want to replace the "vis.aspx" with "Show.aspx" so the new URL becomes
http://www.nordiccab.com/Show.aspx?MenuID=241
. Well, to do this you just replace the
http://yourdomain.no
with the text "vis.aspx" and the
http://www.yourdomain.no
with "Show.aspx" in the code above.
Happy SEO'ing :)
André Vold