Author Topic: 302 Language Redirect SEO issue  (Read 9891 times)

Offline Tez Oner

  • Posts: 257
  • "...it's possible..."
    • VA-MDS / MMO | communications
302 Language Redirect SEO issue
« on: February 11, 2016, 10:01:59 PM »
Hey,

had some 'funny' issue discovered by a 'SEO optimise company'. I seems that WB
(when using multi-languages) redirect the page with a header 302 status - not that
good as it won't return a 200 OK.

It turns out that the issue lays in:

/framework/class.frontend.php - line ~ 139

There is:

Code: [Select]
if ($this->page['language']!=LANGUAGE) {
if(isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != '') { // check if there is an query-string
header('Location: '.$this->page_link($this->page['link']).'?'.$_SERVER['QUERY_STRING'].'&lang='.$this->page['language']);
} else {
header('Location: '.$this->page_link($this->page['link']).'?lang='.$this->page['language']);
}
exit();
}

So dependent on the language it redirect, but in this way it would be an 302. Better would be
deleting the whole part (no 301 / 302 but directly a 200 OK). But as 301 are fine it also can be:

Code: [Select]
if ($this->page['language']!=LANGUAGE) {
if(isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != '') { // check if there is an query-string
header("HTTP/1.1 301 Moved Permanently"); // ADDED
header('Location: '.$this->page_link($this->page['link']).'?'.$_SERVER['QUERY_STRING'].'&lang='.$this->page['language']);
} else {
header("HTTP/1.1 301 Moved Permanently"); // ADDED
header('Location: '.$this->page_link($this->page['link']).'?lang='.$this->page['language']);
}
exit();
}

Like this pages return a 200 OK status.

Some checkers:
https://monitorbacklinks.com/seo-tools/http-header-status-check
http://www.redirect-checker.org/index.php


Cheerz,

Tez Oner
Tez | VA-MDS / MMO | communications
--------------------------------------------
info@va-mds.com / http://va-mds.com

Offline Luisehahne

  • WebsiteBaker Org e.V.
  • **
  • Posts: 4344
  • Gender: Male
    • Webdesign und Entwicklung WebsiteBaker
Re: 302 Language Redirect SEO issue
« Reply #1 on: February 12, 2016, 11:26:38 AM »
Tks. Fixed in coming WB283 SP6

Dietmar
Immer nur von der Zukunft reden, die Gegenwart vergessen und auf die Vergangenheit schimpfen
Neues Unwort: Schnappatmung

Offline Tez Oner

  • Posts: 257
  • "...it's possible..."
    • VA-MDS / MMO | communications
Re: 302 Language Redirect SEO issue
« Reply #2 on: February 12, 2016, 05:14:48 PM »
Tks. Fixed in coming WB283 SP6

Dietmar

Cool.

Cheerz,

Tez Oner
Tez | VA-MDS / MMO | communications
--------------------------------------------
info@va-mds.com / http://va-mds.com

 

postern-length