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

Help!!

The question asks You've built this page only to practice HTML, and don't really have merchandise to sell. Use the proper "noindex" code to make sure search engines don't display it within search results I have <html> <head> <meta charset="utf-8"noindex> <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" /></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 <ahref="http://hats.com">Hats.com</a></p></body></html>

What do I do?

2 Answers

Matthew Mascioni
Matthew Mascioni
20,444 Points

Hey Ashley!

Hope you're enjoying SEO Basics. One of the ways we can give search engines instructions is through meta tags. Spiders (like Googlebot) can interpret these when crawling your website. They look like this:

<meta name="property" content="value of property" />

However, in our specific case, we don't want the search engine spider to index this page. The name we're going to use is robots (similar to how we can use robots.txt files to accomplish a similar task) Our content is given to us by the quiz:

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

Now, when a spider crawls here, it'll look at that tag, realize that it pertains to it, and see noindex, so it proceeds to ignore that page (so that it might not occur in search engine results)

Re-watch the course video for a better explanation; hope this helps! :)

Thank you It worked and it makes more sense.

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