1

There is a website where users can post content. Often, users repost content they’ve made on other websites, to this website. (For example, their blogs, Facebook, news website, etc.) Because they repost things, they often want to set a <link rel="canonical" /> on their content, pointing to the original content. This could be any URL they want. Would it be safe to let them do that? Could they do anything bad to other users? Could they use it to make users viewing the content make requests to arbitrary locations? Could they negatively impact the SEO of other pieces of content?

0

According to the MDN documentation for the HTML link element, a <link> points to a resource at a different location, and describes the relationship between the current page and that external resource. This is primarily used for the purpose of organizing content in regard to search engines. When that piece of content can be found on multiple websites, the rel="canonical" bit will essentially tell the search engine "This is the original source for this piece of content." Any search engine or other user accessing this information can either use this information or not, depending on what they want to do with it, but it doesn't inherently enable additional functionality like sending requests on the user's behalf. You can read more about canonical link elements on their wikipedia page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.