11
Does the part to the right of the at sign in email addresses have to be a valid website url? I just saw two email addresses where the right part didn't look to be a website address. In fact, it didn't open when I tried to do so via a web browser.
11
Does the part to the right of the at sign in email addresses have to be a valid website url? I just saw two email addresses where the right part didn't look to be a website address. In fact, it didn't open when I tried to do so via a web browser.
14
No it does not have to be the same. Email uses a different protocol than websites, and there's always the option to have non-existing domains for internal emails (inside companies).
For example, if I have a domain controller which hosts MyDomain.local, and I have an exchange server inside this domain, I can have LPChip@MyDomain.local
If I do not host a webserver and disable everything else that makes websites, http://MyDomain.local will not work.
On top of that, given that this is an internal address only, it will not work from the outside either.
If we talk about external email addresses, then the following matters:
The email address has 2 parts: the user and the domain + optionally subdomains.
If we take for example: LPChip@email.example.com, then LPChip is the user, email is the subdomain and example.com is the domain.
The domain has MX records that tell where email is located. It is this route that is used to deliver email by the SMTP protocol.
Now its also possible to have an @ in a website url which usually means username@website but can also be used as @ char in the website's uri.
For example, the following website address is valid: https://example.net/owa/username@example.com
The uri here is /owa/username@example.com and does contain a @.
Another example is this:
1So, SMTP requires a valid domain name to deliver emails outside organizations? – codezombie – 2015-10-02T10:19:06.520
Good answer, I didn't know I can log into my Gmail and Yahoo Mail accounts by entering http:myusername@gmail.com
or http:myusername@yahoo.com
into web browser's address bar. – codezombie – 2015-10-02T10:21:36.857
2Yes unless it knows the IP address (that is what the domain gives anyway). Also, do note that the website must support this. You can even do username:password@domain, but this is very insecure. – LPChip – 2015-10-02T10:44:50.023
1While it is pretty much ubiquitous that the portion after the @ is a domain name and is called a domain name these days, it is also valid to put a string that is otherwise a host name and could be considered a host name after the @. There must be an MX record for it to work. If you have a host called email.domain.com and you create an MX record for email.domain.com, you can address mail to user@email.domain.com and it is logical to call the "email.domain.com" portion either a "hostname", "domain name", or "subdomain name". – Todd Wilcox – 2015-10-02T20:01:11.773
1@JasonStack usually you can't. Most websites don't use Basic Auth. And how would you even do it with GMail, considering that your "username" there is an email address, which has an @
in it? :) – hobbs – 2015-10-02T23:39:56.427
2@ToddWilcox Exactly - that's how internet mail got routed to uucp hosts (something I had some experience with back in the day). Not every DNS record contains an associated IP address (but if it includes an MX entry, off-internet mail routing can work) and not every IP address has to host a web site. I think the OP may be confused about the distinction between "valid domain name" and "valid website address". – Jamie Hanrahan – 2015-10-03T05:04:55.660
13
No, website and email address have basically nothing in common.
The right part of info@microsoft.com means that you send email to a domain called microsoft.com. The protocol used to send email is SMTP.
But the url http://www.microsoft.com/ means you want information that are hosted on a server called www. The protocol used is HTTP.
It is not required that these two parts exists for both protocols. And the contrary is also valid. For example, you may have a support website like http://support.dell.com/ and have no email address whatsoever @support.dell.com.
1
It would be a better example if you used http://microsoft.com so at least the domain's the same.
– Lightness Races with Monica – 2015-10-03T18:25:39.79010
user@example.org is a working email address if the MX record for example.org points to a working mail server that accepts mail for that email address (i.e. listening on port 25 and handling SMTP requests).
http://example.org/ is a working URL if the A record for example.org points to a host running a web server (i.e. listening on port 80 and handling HTTP requests). If there is no web server at example.org, most browsers follow the standard recommendation to also try http://www.example.org/.
Look up the relevant Internet RFCs, e.g. for TCP where it explains ports, if you want more details.
These are two different services that are completely separate. A server might be running one or both.
As Tersosauros points out, "valid" has a technical meaning of not-a-syntax-error, not necessarily "working". See that answer for more.
Email is special in terms of DNS. MX records can list any mail server as the Mail-Exchange for a domain name. All other services (ssh, ftp, http, https, etc. etc.) use the A (IP Address) record directly, rather than first checking a "what's the FTP server for example.org" record for an extra layer of indirection. This is irrelevant for this question, though. All Internet services are orthogonal, and might or might not be present for any given domain name.
(port-based routing by a router/firewall can split up the http and the ftp traffic (for example) to different servers for a single IP if needed for large sites, so other services aren't missing out from not having their own indirection records like email does.)
2This is by far the best answer. – Keavon – 2015-10-03T02:44:01.343
1@Keavon: Thanks :). The two other answers didn't really get to the heart of the point, IMO, and looked somewhat confusing. – Peter Cordes – 2015-10-03T07:09:11.813
1There are services that uses SRV
records to provide a similar sort of indirection - prominent examples are SIP and XMPP. If we were rebuilding the Internet from scratch we might want to do that for everything. – zwol – 2015-10-03T16:49:40.033
3
The OP (and perhaps some of the commenters/answers) may be confused in vocabulary.
A valid website url (while trying not to be too pedantic) could be one of two different things:
abc://azertyfoo.baz:303/
- this however is NOT a web address.://
), AND names a valid resolving fully-qualified domain name (FQDN). For example: http://superuser.com:80/
is a valid website URL (under these conditions).Plenty of other answers have addressed the differences in DNS records with regards to web (i.e. A records) versus email (MX records).
I suspect that where people perhaps are getting confused may be with the host portion of the email address.
A host may be any of the following in an email address:
MyMail.local
- obviously .local
is not a valid top-level-domain (TLD), however this domain name is still valid and may resolve in a corporate environment.localhost
(the default address on error pages in many versions of Apache is webmaster@localhost
, for example). Nobody beyond the local machine will be able to ever send mail to that inbox, however, on that machine (assuming it is running sendmail or similar), the address is valid.127.0.0.1
- again this is valid in a particular environment. However I doubt many (or any?) mailservers would forward mail to that host if you attempted this on the open Internet.Any of these valid hosts may also be a valid website url if enclosed in an appropriate scheme and path: http://
[any of the above]/
Good point, updated my answer to say "working" instead of using the OP's word "valid", which has a different technical meaning. – Peter Cordes – 2015-10-03T20:08:43.653
12Note: There was email on the internet (using the same protocols as today) before there was the WWW. – Carsten S – 2015-10-02T17:34:13.347