In this case, youtu.be is a known url shortener. I think best practice would be to always submit the full url, not the bit.ly or goo.gl or t.co or whatever version.
could derefence a link (follow HTTP redirects) and then parse the link rel=“canonical” tag on the page returned in order to do dupe detection like this in the future
A simpler option, although a less generic one, would be to look at whether it’s either youtube.com or youtu.be, and then if the video id matches — duplicate.
https://lobste.rs/s/rliitp/stephen_wolfram_s_introduction_to_the_wolfram_language_-_youtube ?
ah the joy of multiple query string leading to the same place.
In this case, youtu.be is a known url shortener. I think best practice would be to always submit the full url, not the bit.ly or goo.gl or t.co or whatever version.
I did submit the youtu.be link
http://youtu.be/_P9HqHVPeik
which is different than the original
https://www.youtube.com/watch?v=_P9HqHVPeik
could derefence a link (follow HTTP redirects) and then parse the link rel=“canonical” tag on the page returned in order to do dupe detection like this in the future
A simpler option, although a less generic one, would be to look at whether it’s either
youtube.comoryoutu.be, and then if the video id matches — duplicate.