Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Domain name extensions?

Hey guys! Quick questions that isnt so related to treehouse.

How do web extensions work, you know .net, .com, .info etc. I noticed that if you search www.teamtreehouse.org you will actually be linked to a completely different website that has nothing to do with were we are right now. So i assumed that the web extension just changes the ip your reffering too.

Often when you put the wrong extension (in small company websites) you will just be notified that the webpage dosent exist, which makes sense. But sometimes a webpage is listed as existing, but rediricts you to another website, so you can never actually acess that domain name, as your instantly redirected.

This is true for big companies, for instance no matter whatever extension you put to facebook you will be redirected to facebook.com. Why is this tho? Is it that they have bought all extension and then as soon as you enter the site it just imidiately redirects you?

Im pretty confused here, some technical info would be much appreciated!

1 Answer

Ryan Lovett
Ryan Lovett
5,100 Points

I recommend checking out the Digital Literacy track on Treehouse as it covers a lot about what you are referring to. More specifically, check out this section which covers in detail how domains work as well as the protocols for accessing a webpage:

https://teamtreehouse.com/library/how-the-web-works

As for domain extensions, they are referred to as TLDs, or top level domains and include ones such as the familiar .com, .net, .org as well as several others. Each TLD, and domain associated with them exist independent of one another by default, meaning that mywebsite.com and mywebsite.org could be completely different websites, and have completely different owners as they both would have their own unique IP addresses that the domain routes to. You can think of a domain as essentially a subdomain of the top level domain. For example, my website is lovett.io, where ".io" is the TLD (top level domain) and "lovett" is the subdomain of that TLD. Someone else happens to own lovett.com and that website exists completely separate of my own, since it has a different TLD and in turn routes to a different IP address.

You are correct though in the case of companies like Facebook, Google, and even many smaller organizations where they will often buy many variations of their primary domain and redirect them to that primary domain. Often they do this to ensure that a user trying to access their site directly does not end up somewhere else by mistake if say, they make a small typo, or type in the wrong domain extension (Example, facebook.org instead of facebook.com). It also helps them to protect their company identity by attempting to ensure that nobody else can use any variation of their name for other purposes.

Again, I recommend checking out that track I mentioned as it will give you a more in-depth (and likely better explained) look at how it all works, but I hope this has helped clear things up a bit!

Hey Ryan! I'll be sure to check out the course, but your explanation was perfect, thank you so much for taking the time to explain that in such detail. Cheers mate!