Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Business SEO Basics Better SEO Through Code Canonicalization

Challenge: Canonicalization...???

Hi.

I can't figure out the code for this challenge. I saw it on the screen for a second and can't figure it out again :(

Challenge task 1 of 1

This page is actually a duplicate of another. Add a canonical tag and specify the attribute using the source page's URL: "http://mystuff.com/starwars".

Here's the html:

<html> <head> <meta charset="utf-8"> <title>Star Wars Merchandise</title> <meta name="description" content="Shirts and hats for fans of Star Wars"> </head> <body> <p>Star Wars Merchandise</p> <p>Shirts and hats for fans of Star Wars</p> <p>Boba Fett Shirts</p> <p>Available in white; sizes S-M-L-XL</p> <p>Darth Maul Hat</p> <p>Available in black or white at <a href="http://hats.com">Hats.com</a></p> </body> </html>

4 Answers

Put that below the meta tag.

<link rel="canonical" href="http://mystuff.com/starwars" />

Btw, you can always go back and re-watch the video or parts of it. I also think that before delving into SEO, you should take your time to learn HTML.

You're right. And I am trying to learn html as well. I appreciate your time helping me with this :)

The correct answer is:

           <link href="http://mystuff.com/starwars" rel="canonical" />

You can use this this below the meta tag.

<a href="http://mystuff.com/starwars" rel="canonical" />

<link href="http://mystuff.com/starwars" rel="canonical"/>