Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Principle of short domain name

Shulou Source: shulou.com Published: 2022-06-01 04:52:19 10月04日 Update

In a recent discussion, we occasionally talked about short domain names. As to whether short domain names need DNS resolution, I was stunned for a moment. It took a few minutes to get to know it in the evening.

First of all, short domain names still follow the standard format of URL, that is, schema+host+path. Schema has nothing to say, the host part is still going back to their own homes and looking for their own mothers. For example, t.cn belongs to Sina and tb.cn belongs to Ali (in other words, it is hard enough for Sina to grab the domain name t.cn). This part must require DNS parsing. Access the short domain name after clearing the DNS cache. If you grab the package, you can see:

On the other hand, the implementation of the path part is different from each other. In general, the original longer domain name needs to be compressed to 5-8 characters. This involves the question of whether the domain name will be repeated after it is shortened. Take compressing to 6 characters as an example, a-zA-Z0-9 has a total of 62 possibilities, then the combination of 6 characters is 62 ^ 6, about 56.8 billion, and the probability of repetition is relatively small. The compression algorithm is not listed for the time being.

After receiving a request for a short domain name, each short domain name server returns the original long domain name to the client in the way of 302 temporary redirection, as shown below:

Tags: Domain name character way part Sina easy to say nothing customer client that is total server standard format probability algorithm cache words problem Ali Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology NVidia Shulou Tech Info OPPO Reno Shulou Information