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 Noindex and Nofollow

Ack! Can't get "nofollow" code correct

Hi.

I understand noindex and got that part right....but can NOT figure out nofollow. I watched the video portion again and even got a screenshot of the code....but still can NOT get it right....

Thanks in advance for your help.

Here's the challenge: The link to hats.com been added to your page merely for testing purposes. Use the proper "nofollow" code to ensure search engines don't give it any SEO value.

Here's what I typed....what did I do wrong?

<p>Available in black or white at <a href="http://hats.com">Hats.com" rel="nofollow"></a></p>

Here's the entire section code:

<html>
<head>
  <meta charset="utf-8">
  <title>Star Wars Merchandise</title>
  <meta name="description" content="Shirts and hats for fans of Star Wars">
  <link rel="canonical" href="http://mystuff.com/starwars" />
  <meta name="robots" content="noindex"
</head>
<body>
  <h1>Star Wars Merchandise</h1>
  <p>Shirts and hats for fans of Star Wars</p>
  <h2>Boba Fett Shirts</h2>
  <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" rel="nofollow"></a></p>
</body>
</html>

1 Answer

Hi, Dawn.

First of all, even though the challenge treated it as correct, you haven't closed your meta tag (the noindex one). It's supposed to be: <meta name="robots" content="noindex"> Notice the closing > character.

As for the nofollow part, it's important to understand how HTML tags work. You might want to go through the HTML basics.

You're not supposed to change anything between the opening and closing a tags. Instead, you should just add the rel="nofollow" after the href attribute, so the end result should be this:

<p>Available in black or white at <a href="http://hats.com" rel="nofollow">Hats.com</a></p>

Thank you thank you thank you for helping me with this.

I just finished up the SEO Basics section...and will now take your advice....and do the HTML basics one. :)

...I'm learning.... :)

Thanks again.

Dawn

You're welcome. Have fun and good luck! :)