Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Business SEO Basics Better SEO Through Code Noindex and Nofollow

Taylor Plante
Taylor Plante
22,283 Points

Can't get noindex code to work.

Can anybody see a problem with the code below? I'm getting an error message that says I need to include the noindex code in the head section of the document, which it is... Any help is appreciated!

<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="robot" 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</a></p> </body> </html>

1 Answer

I'm not seeing your code but the proper syntax is below. It goes in the head section. If that's what you have you might have to refresh the page.

<meta name="robots" content="noindex">