Page MenuHomePhabricator

MediaWiki redirects should not be handled by javascript
Closed, InvalidPublic

Description

Currently there is a huge bug in MediaWiki where major search engines such as bing not picking redirects because MediaWiki is sending status code 200, I think MediaWiki is using "history.replaceState", for example search for "List of YouTubers" on bing, yahoo and google, which the redirect was created in 2015 from "List of YouTube personalities" to "List of YouTubers", as you can see yahoo and bing are not picking redirects, this such a behavior should be stopped.

Event Timeline

Currently this task does not explain well how to reproduce the problem, and what is expected instead. Following https://mediawiki.org/wiki/How_to_report_a_bug and providing separate sections with steps to reproduce; actual outcome; expected outcome, is highly recommended.

Steps that I tried:

  1. Go to https://encrypted.google.com/
  2. Enter List of YouTubers
  3. Click "Search" button

Actual outcome:
Get https://en.wikipedia.org/wiki/List_of_YouTubers listed as the first result. Which is not a redirect within English Wikipedia.

Expected outcome by original reporter:
????

Read the description please.

This comment was removed by Mjbmr.

I said: for example search for "List of YouTubers" on bing, yahoo and google

Note: to compare, you only searched on google

Read the description please.

I did read the description, and the description was not clear enough to allow reproducing a problem and understanding what the problem is.
Hence I asked you to provide a list of steps to reproduce, actual outcome, and expected outcome. Please follow this scheme for any further tasks that you report, to avoid further misunderstandings. Thanks for your help!

I said: for example search for "List of YouTubers" on bing, yahoo and google
Note: to compare, you only searched on google

I'm happy to do that once you share what both the actual outcome and the expected outcome of those three searches is. :)

@Aklapper The "steps" you have tried does not include what I said, I specifically asked to search also on search engines rather than google to see they don't run javascripts, see that's why I don't want to bother anymore. I specially tagged this with MediaWiki-Redirects so experts who know what I'm talking about to see this.

Viewing https://en.wikipedia.org/wiki/List_of_YouTube_personalities generates the following in page HTML:

<link rel="canonical" href="https://en.wikipedia.org/wiki/List_of_YouTubers"/>

If the search engines you mentioned don't handle it, I think it's their problem.

I think this is actually a duplicate of T53736: Consider changing wikipage redirects to be proper HTTP redirects though?

@matmarex Thanks for responding and sorry to @Aklapper for me not being patient, as you can see on T53736 that ticket has no activating from 2013 to 2015 so may have fixed and returned back but yes they are the same. But you can't simply close this ticket, I won't comment on old ticket, if that ticket was created after 2015 I would because I'm not sure if issue was existing between 2013 and 2015, but it's your guys call as long as somebody is trying to resolve the issue.

As you may know rfc6596 went live on April 2012 so you can tell it's experimental; But you may or may not know the use canonical is to link duplication content and it's not an actual redirect and it has been used for SEO performance and because of spamming and other issues, neither bing or google trust canonical links; please see the blog post by bing here and a post by Matt Cutts here. So there is evidence that none of those search engines use canonical links as redirects but only for SEO improval and they just follow their own rules.

The only reason that google follows redirects is because of using "history.replaceState" in javascript and has been supporting it since early 2012: see here which other search engines are not supporting them and this is an actual bug related to MediaWiki and not other people why they don't run javascript very well; bing supposed to support as seen here but it doesn't and I don't have the answer for that why.

So why we don't use http codes instead, as I saw on T53736: "Not going to happen" just to show the message: "(Redirected from $1)" which there are a lot of workarounds that we can talk about.

Note: I know javascript is the future, there is no doubt, but there is an actual issue.

There will be questions which about status codes to use, if you say it's Wikimedia's policy to not use http status codes and use javascript instead because we only use google and so whatever, I don't care it's about MediaWiki let's have both options it's experimental anyway we can put it to test with other wikis, yes of course we can't afford messing with Wikipedia which is stable now.

BTW when I talk about YouTubers I don't know why people think I'm getting paid.