Url stands for Uniform Resource Locator. which specifies the location of a web resource on the network. It tells the browser about the address of the web page requested for.
There is 4 main parts of urls
Protocol (Scheme) : The very first part of urls is protocol. Protocol tells the browser how to interact with the server to fetch resources. Some of common protocol used as :
- Http : Http is a client-server protocol used to fetch resources like html document, image etc.
- Https : This is HTTP secure protocol used for secure communication over network.
- FTP : file transfer protocol.
Domain name: Domain is a unique identification string. It should be a human-friendly address so that people will remember it while typing on the address bar.
Port : port is used after TLD separated by a colon (:). In most cases it's 80 used with http and 443 used with https if not declared.
Path : it shows specific location of requested file on web server. Path may include hierarchy of directory to locate particular file.
Url : https://www.quizcure.com/seo/friendly-urls-structure
- https is a protocol. Secure http.
- quizcure Domain name.
- .com TLD (Top-level domain)
- Path seo/friendly-urls-structure
- Directory seo
- Web Page name friendly-urls-structure
- Should I include target keyword in url?
- What should be used to Separate the words in the url? Hyphen (-) or underscore (_) or dashes ( - )?
- Does it matters if Trailing slashes added after domain name?
- Trailing slash and non-trailing slash URLs showing same content. Does it cause duplicate content for search engines?
1. Should I include target keyword in url?
Yes. Should be.
We should design user friendly page url. It means that if we see a url we will know what the page is about
A well structured url introduces the page. Introducing keywords in url is the Best practice
Target keyword : mens sports shoes
Reason : There are no keywords introduced in url. Also it is not user friendly url.
Reason : It's better than point#1 but it includes repetitive keyword which is not good for search engines and should be avoided.
Reason : Seo friendly url. keyword is not repetitive and easy to understand
Reason : Directory based urls. Here by looking into url we can predict that all men stuff grouped into directory mens.
2. What should be used to Separate the words in the url? Hyphen (-) or underscore (_) or dashes ( - )?
Hyphen should be used to Separate words in url. Hyphen is recommended to use in urls than underscore or dashes. Most of the search engines treat hyphens as word separators.
Let’s understand actual meaning & usage of following
- Dashes : Dashes includes space on either side while using it to make statements. Urls should now have spaces therefore dashes is not recommended to use in urls. Yes you may use dashes without space in the url and in such case it’s hyphen.
- Underscore : Used to combine two words. As per RFC 1035 Underscore (_) is not permitted in domain name too. It’s not recommended to use Underscore in urls.
- Hyphen : hyphens are used to separate words in urls. It makes the url cleaner and easy to read and understand. Also using hyphen in the url helps better position of the web page in the search result than underscore. Therefore hyphen is highly recommended to use in web page urls.
Not Recommended : https://www.quizcure.com/seo/friendly_urls_structure
Url is combined by using underscore. Therefore it is not recommended.
Recommended urls : https://www.quizcure.com/seo/friendly-urls-structure
Url is combined by using hyphen. Therefore it recommended.
3. Does it matters if Trailing slashes added after domain name?
There is no issue if Trailing slashes are added after domain name.
So, https://www.quizcure.com is same as https://www.quizcure.com/
4. Trailing slash and non-trailing slash URLs showing same content. Does it cause duplicate content for search engines?
Yes same content on both pages having url with slash and no slash can cause issues with duplicate content IF not handled properly.
Urls ending with trailing slash indicates a directory and Urls ending with no trailing slash indicates a file. Therefore it make confusion for user and search engines if they see same content on both pages.
Canonical tag can help to avoid duplication. Canonical tag rel= "canonical" used to tell crawlers about true version of page.