URL Structure
Clear URLs help users trust a link and help search engines understand site structure.
On this page · 5 min · Beginner
On this page
- Learning objectives
- Explanation
- Code example
- Step by step
- Real-world use
- Common mistakes
- Best practices
- Remember this
- Practice exercise
- Mini quiz
- Related topics
- My notes
- Reading time
- 5 min
- Difficulty
- Beginner
- Updated
- Oct 29, 2026
Related tutorials
Learning objectives#
- Write readable, descriptive URLs
- Organise URLs into logical folders
- Handle parameters and trailing slashes
- Change URLs safely with redirects
Explanation#
Good URLs are short, lowercase, use hyphens between words and describe the content: /tutorials/react/usestate-hook.
Folders mirror site structure and feed breadcrumbs.
Avoid session IDs and unnecessary parameters; filters and sorting parameters can create endless duplicates — handle them with canonicals or noindex.
If a URL must change, 301-redirect the old one to the new one and update internal links.
Code example: Before and after#
❌ https://example.com/index.php?page=lesson&id=4821&lang=en&sessionid=a8f3
❌ https://example.com/Tutorials/React_Hooks/UseState%20Hook
✅ https://example.com/tutorials/react/usestate-hook
Redirect when renaming (Apache .htaccess):
Redirect 301 /tutorials/react/use-state /tutorials/react/usestate-hook
The clean URL is readable, shareable, and its folders become breadcrumbs in search results.
This example is illustrative. Copy or download it and run it in your own environment; the expected output is shown above.
Step-by-step explanation#
- Use words, not IDs.
- Lowercase and hyphens only.
- Nest by section.
- Redirect old URLs permanently.
Real-world use case#
A site migration keeps its rankings because every old URL 301-redirects to its new equivalent.
Common mistakes#
Old links break and rankings are lost.
/React_Hooks and /react_hooks can be treated as different URLs. Use lowercase and hyphens.
Best practices#
- Short, descriptive, lowercase, hyphenated
- Logical folders
- One consistent trailing-slash policy
- 301 on every URL change
Remember this#
/section/topic-name.
Hyphens, lowercase, no IDs.
Changed URL → 301.
Practice exercise#
Your task: Create an SEO-friendly URL for a lesson titled “ASP.NET Core Web API: JWT Authentication”.
Show solution
/tutorials/asp-net-core-web-api/jwt-authentication
Mini quiz#
Which redirect should be used for a permanently moved page?
Want more? Practise all SEO MCQs · SEO interview questions
My notes#
Saved in this browser.