Tag Info

Hot answers tagged

128

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 ...


75

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 ...


60

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 ...


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>


14

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


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 ...


11

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: ...


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

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 ...


9

Well, 1.1.1.1 is an IP address. As far as who it is - it's public address space that bad internet citizens tend to use as a placeholder: inetnum: 1.1.1.0 - 1.1.1.255 netname: Debogon-prefix descr: APNIC Debogon Project descr: APNIC Pty Ltd country: AU admin-c: AR302-AP tech-c: AR302-AP mnt-by: ...


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 ...


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

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

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 ...


8

I believe that this website may help you greatly: http://regex101.com/r/uP4nT1


7

Never rely on whether your app will be internal or external. Always develop as though the audience of the app will be outside your control (because it is). Go with ENV.APPNAME.DOMAIN.TLD With www. as the alias for "production".


7

I suspect that any performance increases you'll see are from improving whatever wrapper you're using to make your connections, rather than the overhead of launching curl for each URL. Whether it's curl or netcat or wget, you'll probably want to launch each one separately in order to process their results separately. But I'll answer this question in two ...


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

I wouldn't use .local unless you understand how zeroconf works, as it will become a bigger deal when you start to see IPv6 move into the mainstream. In the past, I've used: Made up TLD (not a good practice for a variety of reasons) Internal subdomain (ie. corp.example.com) Internal domain with a different TLD (ie example.net) IMO, either of the latter ...


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.



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