SEO – URLs and File Names
A URL (the web address of a page) is the first thing both users and search engines see. A clear URL tells what the page is about before it opens.
Parts of a URL
https://www.example.com/blog/seo-title-tag/
|______| |_____________| |___| |___________|
protocol domain folder page name (slug)
The last part is called a slug. In WordPress you can edit the slug of each post under the title.
Rules for good SEO URLs
- Keep it short and clear. Three to five words are usually enough.
- Use lowercase letters. URLs can be case sensitive on some servers, so
/Aboutand/aboutcan be different. - Separate words with hyphens (-). Do not use spaces or underscores. Google treats a hyphen as a word separator.
- Add the main keyword, but do not stuff it.
- Avoid extra parameters and ids when you can:
?p=123&cat=5is not readable. - Avoid dates in the URL for content that will stay useful for a long time. Then you need not to change it when you update the page.
- Do not change URLs again and again. If you must, use a 301 redirect.
Examples
| Bad URL | Good URL |
|---|---|
example.com/index.php?id=458&c=9 | example.com/running-shoes/ |
example.com/Best_Running_Shoes_For_Women_2019_Updated | example.com/best-running-shoes-women/ |
example.com/page1/page2/page3/page4/shoes | example.com/shoes/ |
File names of images and documents
File names also matter. A name like blue-running-shoes.jpg is better than IMG_2045.jpg. Use the same rules: lowercase, hyphens, short and describing. See Images.
Folders and structure
A simple folder structure shows how the site is organised, for example /seo/title-tag/. But do not make it too deep. Pages should be reachable in a few clicks from the home page.
Trailing slash and www
Choose one style, with or without a trailing slash, and with or without www, and be consistent. The other versions should redirect to the chosen one, or use a canonical tag.
| Interview Questions & Answers |
|---|
| What is on-page SEO? |
| What is a meta description? |
| What is a title tag and what is its ideal length? |
| What is alt text and why is it important for SEO? |
| What is anchor text? |