DNS
Published Jun 19, 2021Updated Oct 26, 2022
Contribute to Docs
The Domain Name System (DNS) protocol converts domain names to IP addresses. Think of it as a phonebook for the Internet. It’s hard to remember an exact IP address when we want to access a website.
When we request the URL codecademy.com
, our computer sends a DNS request to a DNS server. The server then returns the correct IP addresses like 104.20.25.250
to route data to and from Codecademy.
Domain Name
Each domain name is made up of three parts:
third-level-domain . second-level-domain . top-level-domain
- Top level domain: There are a limited set of top level domains, and many websites use the most common ones like “.com”, “.org”, and “.edu”.
- Second level domain: The second level domain is unique to the company or organization that registers it, like “codecademy” or “wikipedia”.
- Third level domain (subdomain): It’s owned by the same group and that URL often directs you to a subset of the website.
For example: shop.codecademy.com (Codecademy’s merch shop):
- Top level domain: “.com”
- Second level domain: “codecademy”
- Third level domain: “shop”
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.
Learn more on Codecademy
- Career path
Computer Science
Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!Includes 6 CoursesWith Professional CertificationBeginner Friendly75 hours - Career path
Front-End Engineer
Front-end engineers work closely with designers to make websites beautiful, functional, and fast.Includes 34 CoursesWith Professional CertificationBeginner Friendly115 hours