URL Structure and Slug Optimization
📖 Scenario: You are managing a website that sells different types of fruits. You want to create clear and SEO-friendly URLs for each fruit page so visitors and search engines can easily understand what the page is about.
🎯 Goal: Build a simple URL structure with optimized slugs for fruit pages that are easy to read, consistent, and good for search engines.
📋 What You'll Learn
Create a dictionary with fruit names and their original URLs
Add a configuration variable for the base URL of the website
Generate optimized slugs by converting fruit names to lowercase and replacing spaces with hyphens
Combine the base URL and slugs to form full SEO-friendly URLs
💡 Why This Matters
🌍 Real World
Clear and optimized URLs help users understand page content and improve search engine rankings.
💼 Career
SEO specialists and web developers use URL structure and slug optimization to enhance website visibility and user experience.
Progress0 / 4 steps