Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Mapping Keywords to Pages
📖 Scenario: You are managing a website and want to organize which keywords should be linked to which pages. This helps search engines understand your site better and improves your site's search ranking.
🎯 Goal: Build a simple mapping of keywords to the pages they belong to, so you can easily see which keywords are targeted on each page.
📋 What You'll Learn
Create a dictionary called keyword_to_page with exact keyword-page pairs
Add a variable called default_page to assign a fallback page
Use a loop to create a new dictionary page_to_keywords that groups keywords by their pages
Add a final entry to page_to_keywords for the default_page with an empty list
💡 Why This Matters
🌍 Real World
Mapping keywords to pages helps organize website content for SEO, making it easier to optimize pages for search engines.
💼 Career
SEO specialists and web content managers use keyword-to-page mapping to improve website visibility and user navigation.
Progress0 / 4 steps
1
Create the keyword to page mapping
Create a dictionary called keyword_to_page with these exact entries: 'home': 'index.html', 'contact': 'contact.html', 'about': 'about.html', 'blog': 'blog.html', 'services': 'services.html'.
SEO Fundamentals
Hint
Use curly braces {} to create a dictionary with the exact keyword and page pairs.
2
Add a default page variable
Add a variable called default_page and set it to the string 'index.html'.
SEO Fundamentals
Hint
Just assign the string 'index.html' to the variable default_page.
3
Group keywords by their pages
Create an empty dictionary called page_to_keywords. Then use a for loop with variables keyword and page to iterate over keyword_to_page.items(). Inside the loop, add each keyword to the list of keywords for its page in page_to_keywords. If the page is not already a key, create a new list for it.
SEO Fundamentals
Hint
Use a loop over keyword_to_page.items() and check if the page is already a key in page_to_keywords. If not, create an empty list. Then add the keyword to that list.
4
Add default page entry to the mapping
Add a new entry to page_to_keywords with the key as default_page and the value as an empty list [].
SEO Fundamentals
Hint
Assign an empty list to the key default_page in page_to_keywords.
Practice
(1/5)
1. What is the main purpose of mapping keywords to specific pages on a website?
easy
A. To hide keywords from visitors
B. To increase the number of pages on the website
C. To help search engines understand which page is relevant for each keyword
D. To make the website load faster
Solution
Step 1: Understand keyword mapping
Mapping keywords means assigning each keyword to a page that best matches its content.
Step 2: Purpose of mapping keywords
This helps search engines know which page to show for a search query using that keyword.
Final Answer:
To help search engines understand which page is relevant for each keyword -> Option C
Quick Check:
Keyword mapping improves search relevance = C [OK]
Hint: Keywords guide search engines to the right page [OK]
Common Mistakes:
Thinking keyword mapping increases page count
Believing keywords should be hidden
Assuming it affects website speed
2. Which of the following is the correct way to assign keywords to pages for SEO?
easy
A. Assign multiple unrelated keywords to the same page
B. Assign each keyword to one page with relevant content
C. Use the same keyword on every page to boost ranking
D. Avoid using keywords on pages to keep content natural
Solution
Step 1: Review keyword assignment rules
Each keyword should be linked to a page that contains content relevant to that keyword.
Step 2: Identify correct practice
Assigning each keyword to one relevant page avoids confusion and improves SEO.
Final Answer:
Assign each keyword to one page with relevant content -> Option B
Quick Check:
One keyword, one relevant page = A [OK]
Hint: One keyword per relevant page is best practice [OK]
Common Mistakes:
Putting unrelated keywords on one page
Repeating the same keyword on all pages
Avoiding keywords completely
3. Consider a website with pages: Home, Shoes, and Hats. If the keyword 'running shoes' is mapped to the Shoes page, what is the expected SEO result?
medium
A. The Shoes page is more likely to rank higher for 'running shoes' searches
B. The Home page will rank higher for 'running shoes' searches
C. The Hats page will rank higher for 'running shoes' searches
D. No page will rank for 'running shoes' because it is mapped
Solution
Step 1: Understand keyword-page mapping effect
Mapping 'running shoes' to the Shoes page signals search engines that this page is relevant for that keyword.
Step 2: Predict SEO ranking impact
This increases the chance that the Shoes page ranks higher when users search for 'running shoes'.
Final Answer:
The Shoes page is more likely to rank higher for 'running shoes' searches -> Option A
Quick Check:
Keyword mapped page ranks higher = D [OK]
Hint: Mapped page ranks better for its keyword [OK]
Common Mistakes:
Assuming unrelated pages rank higher
Thinking mapping stops ranking
Confusing keyword mapping with hiding keywords
4. A website owner assigned the keyword 'summer hats' to both the Hats page and the Home page. What is the main SEO problem here?
medium
A. Improved ranking because multiple pages use the keyword
B. The website will load slower due to keyword duplication
C. No effect because keyword mapping is not important
D. Keyword cannibalization causing search engines to be confused
Solution
Step 1: Identify keyword duplication issue
Assigning the same keyword to multiple pages causes keyword cannibalization.
Step 2: Understand SEO impact
Search engines get confused which page to rank, lowering overall ranking potential.
Final Answer:
Keyword cannibalization causing search engines to be confused -> Option D
Quick Check:
Duplicate keyword mapping causes confusion = B [OK]
Hint: Avoid assigning one keyword to multiple pages [OK]
Common Mistakes:
Thinking multiple pages improve ranking
Ignoring keyword mapping importance
Confusing keyword duplication with site speed
5. You have a website with pages for 'Men Shoes', 'Women Shoes', and 'Kids Shoes'. How should you map the keyword 'shoes' to improve SEO without causing keyword cannibalization?
hard
A. Map 'shoes' only to the Home page that links to all shoe categories
B. Map 'shoes' to all three shoe category pages equally
C. Avoid using the keyword 'shoes' anywhere to prevent confusion
D. Map 'shoes' only to the 'Men Shoes' page
Solution
Step 1: Analyze keyword scope
The keyword 'shoes' is broad and covers all categories, so it fits best on a general page like Home.
Step 2: Prevent keyword cannibalization
Mapping 'shoes' only to the Home page avoids multiple pages competing for the same keyword.
Step 3: Assign specific keywords to category pages
Use 'men shoes', 'women shoes', and 'kids shoes' for their respective pages.
Final Answer:
Map 'shoes' only to the Home page that links to all shoe categories -> Option A
Quick Check:
Broad keyword on general page, specifics on category pages = A [OK]
Hint: Assign broad keywords to general pages only [OK]