Tag Info

Hot answers tagged

117

One of the reasons why you need www or some other subdomain has to do with a quirk of DNS and the CNAME record. Suppose for the purposes of this example that you are running a big site and contract out hosting to a CDN (Content Distribution Network) such as Akamai. What you typically do is set up the DNS record for your site as a CNAME to some akamai.com ...


67

One good technical reason to make www.example.com canonical is that cookies of a main domain (i.e. example.com) are sent to all subdomains. So if your site uses cookies, they will be sent to all its subdomains. Now, this often makes sense but it’s positively harmful if you only want to download static resources. Consider all the style sheets and images on ...


52

The notation in that case is to encode the IPv6 IP number in square brackets: http://[2001:db8:1f70::999:de8:7648:6e8]:100/ That's RFC 3986, section 3.2.2: Host A host identified by an Internet Protocol literal address, version 6 [RFC3513] or later, is distinguished by enclosing the IP literal within square brackets ("[" and "]"). This is ...


43

Basically, someone has managed to convince the owners of the ccTLD 'to.' (Tonga?) to assign the A record to their own IP address. Quite a coup in the strange old world of URL shorteners. Normally these top-levels would not have IP addresses assigned via a standard A record, but there is nothing to say that the same could not be done to .uk, .com, .eu, etc. ...


22

Do not use .local. Do not use .anythingyoujustmadeup either. Don't even use the reserved TLDs. Use a real domain or sub domain and just don't allow it to be visible to the outside world. The main reason for this is when you work for company A that uses .local (or example.com) and they buy company B that also uses .local (or example.com). Not a lot of fun ...


21

There is a great add-on for Firefox called Locationbar² that does just what you want (and some!). One of its main features is to break the URL into breadcrumbs. In the options dialog you can specify what protocols you'd like to hide: Here is what mine looks like:


20

The entire HTTP request (and response) is encrypted, including the URL. But yes, there is a way an attacker could grab the full URL: through the Referer header. If there is any external file (Javscript, CSS, etc.) which is not over HTTPS, the full URL could be sniffed in the Referer header. Same if the user click on a link in the page that leads to an HTTP ...


19

"to" (the country TLD for Tonga) is the entire domain for the site - there's no browser trickery: $ telnet to 80 Trying 216.74.32.103... Connected to to. Escape character is '^]'. GET / HTTP/1.1 Host: to HTTP/1.1 200 OK Date: Thu, 03 Dec 2009 18:34:04 GMT Server: Apache/1.3.27 (Unix) (Red-Hat/Linux) mod_perl/1.26 Transfer-Encoding: chunked Content-Type: ...


16

<VirtualHost ip:80> ServerName domain.com RedirectMatch permanent ^(.*)$ http://www.domain.com$1 </VirtualHost> <VirtualHost ip:80> ServerName www.domain.com ... usual config </VirtualHost>


16

The HTTP:// string is not a prefix of the URL, it's part of the URL. Which is why you can't (and shouldn't) hide it, since the application is displaying the URL.


14

Any DNS zone can have any DNS record for that zone itself (in a bind configuration file, this record is labeled with an @). Actually -- let me ask this -- can the root zone have an @ to describe itself? IE can @ have an address record? I don't see why it couldn't. that would be a cool address to have. "http://./" The "Root" zone is simply a zone named ...


13

No, they can see the connection ie mysite.com but not the ?mysecretstring=1234 the https is server to server


10

The "www" part is not really a standard. It's a tradition. It's up to the webmaster/sysadmin to make it work. Just because most sites have enabled both ways (with www and without www), doesn't mean that they have to. In fact, have you noticed that some websites have something like www1, www2, etc.? That's because the sysadmin can decide what he/she wants to ...


9

It's because the "www." is part of the DNS name that resolves to their web server's addresses. The ones that don't have "www." don't have it as part of their DNS name.


9

Do not use an invented TLD. If ICANN were to delegate it, you would be in big trouble. Same thing if you merge with another organization which happens to use the same dummy TLD. That's why globally unique domain names are preferred. The standard, RFC 2606 reserves names for examples, documentation, testing, but nothing for general use, and for good reasons: ...


9

If you're mostly concerned with it being indexed by Google, et al., then you could use a robots.txt file. That said, if you tell robots not to index it, you're also tipping your hand to its existence. ("Ignore the man behind the curtain.") Two people so far have commented that if you put the directory in robots.txt, it becomes obvious that there's ...


9

Nobody's mentioned logging yet. If you are using plain HTTP, then any proxy / firewall device in between your server and your end user can log your URL and administrators of those devices will be able to see the "supposedly private" URL being accessed. If you want to be sure your URL won't be leaked even to intermediate devices like proxies and firewalls, ...


9

Yes, it's best (SEO wise) to have one redirecting to the other. You want to avoid content duplication and link-juice fragmentation (although those 2 should be have been fixed by now on the major search engines). <VirtualHost *:80> ServerAlias www.example.com RedirectMatch permanent ^/(.*) http://example.com/$1 </VirtualHost> Keep in ...


8

You will want to setup the new domain's hosting and point the old domain as an alias domain. From there, in your Apache config or .htaccess access file, you want to use Apache's mod_rewrite to complete a 301 redirect on your old domain and any sub-pages to point to the new domains. When you do a 301 redirect, most common search engines will transfer the SEO ...


8

It is unlikely that it will be found, but you can't trust it. If you don't want the world to see it, put some kind of authentication on it so your friend has to at least log in. Even then, once you share it with your friend you can't be sure he hasn't leaked the secret to someone else. If you must do this, take it down once you no longer need to share it.


8

Slashdot had an article about this a couple of days ago. Tim Berners-Lee indicates that there was no particular reason why the two slashes are there (see also http://bits.blogs.nytimes.com/2009/10/12/the-webs-inventor-regrets-one-small-thing/). Personally, I like the idea of this style of URL: http:/com/example/www/blah1/blah.html There's no explicit ...


8

Only through web server. DNS is not suitable if you want to domain redirection. Domain redirection: HTTP 3xx response refresh meta tag JavaScript redirects All techniques use web server.


8

DNS doesn't know anything about ports. If you want to have tomcat listen on port 8080 then you have a couple of options. The first is to user the port number in the URL http://example.com:8080/ If you don't like to look of that then you can use your webserver as a port proxy e.g in Apache you can use mod_proxy <VirtualHost *:80> ServerName ...


7

DNS is a hierarchy, with the topmost element at the far right. If you want a DNS entry for m.af.ia you would need to register af.ia. This is currently impossible: The .ia top-level domain does not exist according to the root zone database. You can petition ICANN for a new top-level domain, but I doubt you'll get it (and it would be hideously expensive...)


7

The part of the URL before the domain name (the www. in this example) is normally interpreted as the logical name of the computer on that domain's network that is required (so you might have a server which calls itself 'www', one which calls itself 'mail', etc.). If you don't specify a specific domain resource then the default is used, and normally that's ...


7

The protocols (http, ftp, gopher, etc) which turn into links when surrounded by square brackets ([]) are defined in the $wgUrlProtocols array in your LocalSettings.php file. Here are the default protocols allowed. $wgUrlProtocols = array( 'http://', 'https://', 'ftp://', 'irc://', 'gopher://', 'telnet://', // Well if we're going to ...


7

www is a subdomain usually used for the web server on a domain along with others for other purposes such as mail etc. Nowadays, the subdomain paradigm is unnecessary; if you connect to a website in a browser, you'll get the website, or sending mail to the server will use its mail service. Using www or not is a matter of personal preference. Opposing points ...


7

Setup a robots.txt file to block things from search engines.


7

Let's break this example down briefly: http://www.serverfault.com/questions. http:// - the protocol used (HTTP in this case) www - the third level domain, sometimes used as a hostname. Also frequently called a subdomain. .serverfault - the second level domain, which is registered with a domain registrar .com - the top level domain . - the root domain. ...


6

Certainly 301 one to the other. It's necessary to make the www. the canonical version when you envisage you might at some point have other hostnames/subdomains under the same domain, with their own security contexts. If you plump for the non-www. version, you won't be able to set cookies on the main example.com site without also making them available to ...



Only top voted, non community-wiki answers of a minimum length are eligible