Website URL

What is a Website URL? How Does URL Work?

Posted by

A website URL is the address of a particular website, directory, or file on the Internet. The URL is the short term for Uniform Resource Locator. Each URL consists of several parts and the way you create it can have a range of consequences on the security and Search Engine Optimization (SEO) of your site.

URLs consist of various sections that inform a web browser how and when to retrieve a resource including a protocol, domain name, port path, and query parameters.

For example, your web browser can take you to this post if you enter https:/www.troposal.com/csv-to-sql-converter/ into your web browser. But if you actually visit https:/www.troposal.com/, you’re taken to the homepage of Troposal.

How Does URL Work?

Example: https//example.com:443/php?category=laravel#section1

Scheme(https://): Protocol is the set of rules which is used to transfer data over the Internet from one device to another. Encrypted(HTTPS) and insecure(HTTP) for web resources, or something else entirely(FTP) for files on a File Transfer Protocol.

Domain(example.com): Domain is the main identifier of the site where the user sends the request. For HTTP(s) requests, the host gets set to this(Host: example.com).

Port(80 or 443): It is usually not visible in URLs, but It is necessary and following by a colon. Defaults to 80 for HTTP and 443 for HTTPS.

Path(/php): Path to ask the server for. The path and the query parameters are combined in the request, like: /php?category=laravel

Query Parameters(category=laravel): Query parameters are usually used to ask for a different version of a page (Laravel in PHP).

URL encoding: URLs are not allowed to have certain special characters like spaces, @, etc. So to put them in a URL you need to percent-encode them as % + hex representation of ASCII value space is %20 etc.

Fragment ID: This is not sent to the server at all. It is used either to jump to an HTML tag(<div id=”section1″…) or by Javascript on the page.

Leave a Reply

Your email address will not be published. Required fields are marked *