URL Encode

URL Encode:

URL encoding is a technique that allows browsers or servers to interpret special or incorrect characters in a URL. The associated URL is converted to ASCII code. As a result, URLs should only contain ASCII characters. RFC3986 defines the standard for URL structures.

Background;

       The American Standard Code for Information Interchange, abbreviated ASCII, has been used for data transport on the Internet. The accessible characters are based on an English typewriter keyboard and include both the capital and lowercase Latin alphabets, as well as Arabic numerals and various punctuation marks. Originally, ASCII characters were assigned to a 7-bit sequence. An 8-bit pattern is now employed. Because there are 28 potential combinations, all possible characters and encodings can be represented.  

URL Encoding is based on ASCII and allows for the inclusion of spaces and other special characters in URLs. These issues are most common with automatically produced URLs, such as when product or article titles are translated into URLs. URL encoding is always started with a%.

Example:

At the end of a URL, space is normally understood. A space in the middle of the URL (for example, www.example.com/new site.html) will result in an error since browsers will be unable to resolve the URL. Users that request such a URL may receive a 404 error code. The space is replaced by an ASCII character, in this example 20 hexadecimal (%20).

Invalid characters:

There is a risk that these characters will not be interpreted correctly. It is recommended to encode the following characters in any case:

„ <  > # % { } \ | ^ [ ] ` and spaces

Reserved characters:

The characters listed below are reserved and have specific meanings in the data route. They are not always easy to encode. This includes the following:

! # $% & ' () * + , /: ; = ? @ []
A # in a URL, for example, represents a jump mark inside a website. The & symbol denotes a query string and separates individual parameters from the URL, whereas the equals sign (=) specifies a parameter's value.

Non-reserved characters:

These characters are not reserved and have no predefined meaning for the URL. The non-reserved characters include:

Letters [A-Z, a-z], digits [0-9] and - _. ~

Encoding tools:

There are numerous online programs that can quickly and easily transform an invalid URL into a valid one. For small websites, manual URL encoding is still possible. However, in the case of huge web projects, webmasters and SEOs should take care to encode URLs ahead of time in a way that browsers and servers can easily interpret.

 

Cookie
We care about your data and would love to use cookies to improve your experience.