[Day 2]Who shows you the way to a website? -- IP Address, 'A' Record and 'CNAME' Record

Yesterday, we learned about the Domain and the 'MX' Record. With the 'guide', 'MX' Record of the Domain 'outlook.com', emails can be sent to the server.

However, when you were learning how emails are sent with the 'MX' Record yesterday, did you wonder how you visit 'outlook.com' through a browser to write emails?

Actually, besides the 'MX' Record which points to the address of the mail server, there is another Record called 'A' Record that tells where the website server is.

For example, the 'A' Record of 'outlook.com' is '183.60.82.98'. ('183.60.82.98' is an 'IP Address', like the 'House Number' of the server.) So, when visiting 'outlook.com', the browser will first find the 'A' Record, '183.60.82.98', and then browse to this IP Address.

Then, what's a 'CNAME' Record? In fact, it's like a 'Shortcut'. For example, if I point the 'CNAME' Record of 'example.com' to 'outlook.com', then the browser will look up 'outlook.com' and visit '183.60.82.98'.

Why do many websites use the 'www' subdomain instead of the root one?

First of all, a wrong concept needs to be corrected: the 'www' subdomain and the root one are by no means the same! However, due to certain restrictions, the root one doesn't support 'CNAME' Records. Therefore, many users who want to use CNAME decide to use the 'www' subdomain which stands for 'World Wide Web' instead.

Now, we have learned the basic Record rules of Domains. Starting tomorrow, we will learn how servers serve their users.