Tag Info

Hot answers tagged

48

Keep in mind though that using www.example.com lets you to set Cookies only on the main site. Using example.com will only allow you to set cookies on *.example.com which includes static.example.com. So every request for any subdomain will include the cookies which slows down the transfer a bit. Using www.example.com will allow you to decide for what part you ...


21

If you are going to use www.domain.com, you should make domain.com a permanent re-direct to www.domain.com. The www subomain, in some cases, is actually a completely different server than the parent TLD. While most search engines are smart enough to figure that out, its still good practice to place the re-direct. I'm the complete reverse of that, ...


19

Including the www subdomain seems to boil down to two conditions. Cookies - Will setting cookies at *.example.com cause me grief (incur more traffic) because the cookies will be sent with every request, regardless of subdomain. In this case I would opt to use the www since it gives me the choice of setting cookies at *.exmaple.com if I need it (ex. ...


18

Either way is fine from a user perspective, as long as both work when you type them in the address bar. The problem is having both without redirecting one to the other. Google and other search engines will count www.example.com and example.com as two different URLS. This, along with inconsistently ordered URL parameters, is one of the major causes of ...


15

This is a minor consideration but one that is relevant for commercial sites. There is an expectation from non-technical users that a website starts with www so when they don't see that they might not think of a domain as a website. Whilst it may seem silly to those of us that know how things work I have come across this attitude frequently with family, ...


10

For SEO ranking purposes there is no difference between www and non-www. The www is just a subdomain of the main domain and Google considers subdomains and sub-directories equal (i.e. part of the same website, not special in any way). You do need to pick one versus the other, though, as using both will cause you SEO problems. Since www.domain.com is a ...


10

If you don't specifically tell Google your preference you will probably have duplicate content issues. There is more then one way to inform Google of your preferred domain: Do a 301 redirect to use the 'www' or no 'www' Specify your preferred domain in Google Webmaster Tools Use canonical URLs (although it isn't typically used in this situation)


9

Personally I would put domain.com on contact cards,etc and have it redirect to www.domain.com. This can be done with a simple rewrite. The reason for this is that my users should never be concerned with having to type www. I absolutely hate sites that require people to type the www - I think it's a completely outdated requirement from years gone by. You ...


7

There don't seem to be any concrete reasons for using one over the other as far as search results or other desired outcomes. My personal preference is no-www, due to length. The most important thing is to make sure you redirect to your preferred domain, and remember to set your preferred domain in Google Webmaster Tools.


7

First, I hope you put a proper 301 redirect for any page in your htaccess. If some of your pages require parameters, like example.com/?p=20, then you need to use mod_rewrite with [R=301] instead of the easier mod_alias Redirect directive in your htaccess. Also, until Google Bot comes again and indexes, it will not update the Google index. Second, it will ...


7

For reasons why you should (or should not) use the www subdomain prefix then see this related post on StackOverflow which raises some good points for both cases. However, it is untrue to say it has been "deprecated" in any form - perhaps somewhat fallen out of favour, but in no way officially deprecated. When it comes to SEO the main thing is to only use ...


7

Basically www is just a subdomain. The reason the specific site doesn't work without the www subdomain can either be a misconfigured DNS or a misconfigured configuration. You can try to do a nslookup to find out to which IP's they are assigned (to check the DNS settings are correct): Example of my own domain: nslookup responsible-disclosure.com Server: ...


6

If you are serving the same content under both domain names and you do not have the option to redirect (301/permanent) visitors who land at the non-canonical domain over to your canonical domain, you should register both domains at Webmaster Tools and then set your preferred domain.


5

Updated based on the comment provided by @Lèsemajesté This happens because FF and IE9 have chosen to implement an anti-cross-domain DRM mechanism for web fonts. I fixed it by using the following code in my htaccess file to pin the site to a single domain no matter which version of a url it's accessed from (this also seemed useful from an SEO point of ...


5

First you should address how search engines crawl your site and avoid duplicate content issues by making sure you have the www subdomain (www.example.com) redirecting to your root domain (example.com). The most efficient way to do this is to create a DNS record - see the first example here on how. You should also use your web server's configuration to ...


5

Yes, this is definitely possible. But please note that, by convention, www.domain.com is just an alias for domain.com. So, what you describe is not at all standard and violates most users' expectations. It also runs at least some risk of search engine penalties. So, in my opinion, it is not a good idea, but yes, it's possible. Exactly how you do it depends ...


4

Check out the Google Articles on how to do it. For the non-asynchronous tracking code: http://www.google.com/support/analytics/bin/answer.py?hl=en&answer=55503 For the asynchronous tracking code: http://www.google.com/support/analytics/bin/answer.py?answer=174090 One thing Google doesn't mention for Asynchronous tracking. If you have DomainNames set ...


4

I think folks are pretty-much used to it, especially those typing in URLs. I modified my primary hobby site to redirect from non-www to www a few years ago and didn't see any negative impact in traffic or user comments. YMMV of course ;) One comment on the rewrite rule. Be careful if you are rewriting at multiple levels of your site with .htaccess files. I ...


4

The 301 redirect is what you want to use if SEO is your primary concern. The 301 redirect will not only tell the search engines your pages have moved (assuming you are currently using both the www and non-www versions of your pages) but also help them associate the old URLs with the new URLs. This means any links you have to your old pages will count towards ...


4

RewriteRule ^$ /index.html [L] This will tell Apache to treat the hit to the yoursite.com as hit to yoursite.com/index.html without redirecting (URL stays the same). The code you already have (last 2 lines) tells Apache to redirect not www-prefixed url to one with www in front (e.g. http://yourdomain.com/somepage.html => ...


4

Per your response to LazyOne and paulmorriss, I can only assume that you have an incorrect DNS configuration. We can automatically rule out that it ever gets redirected to eshop just because it shows, per your description, leads to the domain company. No where in and DNS entries that I have edited have I seen a wildcard entry (*) like you have above for ...


4

Look for 301 redirection rules in your .htaccess or in httpd.conf. In httpd.conf look for a rule like this one: < VirtualHost www.domain.com > Redirect 301 / http://domain.com/ < /VirtualHost > In .htaccess look for a rule that looks like: RewriteCond %{HTTP_HOST} ^www.domain.com [NC] RewriteRule (.*) http://domain.com%{REQUEST_URI} ...


4

http://www.example.com and www.example.com would refer to the same thing. Modern browsers assume that the protocol is http://. Some browsers are even starting to hide the implicit http:// when showing URLs in the URL bar. www.example.com and example.com can be very different. It is possible to run two different sites at those addresses with completely ...


3

One thing to keep in mind is that DNS does not provide a redirect - adding an A or CNAME record will only provide your IP address to people that type in that URL. If you only add one of these two records, www.example.com and example.com would both resolve to your web server, essentially giving each page on your site two addresses and potentially wreaking ...


3

Without repeating the valid answers above regarding cookies, aesthetics, non-technical users expecting the www subdomain etc... Another reason I tend to favour the www. subdomain approach for the main site is for local development. I use local. for my local test server. I always expect the site to be accessed via a subdomain and can easily distinguish ...


3

I personally prefer the www domains. As one of @Jonathon's points, the real main reason is with cookies. When you have domain.com and you apply a cookie to it, that cookie governs all sub domains such as www.domain.com, foo.domain.com and bar.domain.com which can cause you headaches in the future if you're dealing with sessions or security. You can always ...


3

If I understood this correctly, you want to have all visits to the site redirected to the domain (not the www subdomain), but you have the GA code set up to track the www subdomain. I think the best way to do it is edit the settings in GA to point to example.com. When you go to GA, you should have two links in the right of the account name, edit and delete. ...



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