Questions tagged [no-www]

The process of eliminating the usage of WWW to prefix URLs.

The process of eliminating the usage of www to prefix URLs, for instance by redirecting users from http://www.example/ to http://example/. www is by many considered a dead and unnecessary practice.

256 questions
574
votes
19 answers

Nginx no-www to www and www to no-www

I am using nginx on Rackspace cloud following a tutorial and having searched the net and so far can't get this sorted. I want www.mysite.example to go to mysite.example as normal in .htaccess for SEO and other reasons. My…
TheBlackBenzKid
  • 26,324
  • 41
  • 139
  • 209
69
votes
5 answers

.htaccess Remove WWW from URL + Directories

This seems to be a non-issue for many people (read: I can't find an answer), but I would like to update the following htaccess code to not only remove the 'www' from the URL, but also any sub-directories that are accessed. RewriteEngine…
Cycododge
  • 943
  • 1
  • 8
  • 10
21
votes
4 answers

Force non-www and https via htaccess

I'm trying to force a user to be redirected to the non-www website, and, force https. I've got this which sort of work, but doesn't force https, when http is entered. RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$…
bear
  • 11,364
  • 26
  • 77
  • 129
20
votes
4 answers

domain without www not working, but with www is working on Azure

we have a site that we recently moved to Azure, did the DNS mapping for www.sitename.com and also for sitename.com however when I access the site without any www prefix, it throws up an error. when I provide www. prefix it works fine. what could I…
Vikram
  • 6,865
  • 9
  • 50
  • 61
15
votes
2 answers

www in domain not working in nginx

I'm new to using nginx, well, new to using anything that's not cpanel... I'm having problems getting domains to work using nginx when you include www. in the url. www.mydomain.com > not work 404 mydomain.com > works I'm not sure if I have made…
DOA
  • 362
  • 1
  • 2
  • 10
15
votes
4 answers

Remove www site-wide, force https on certain directories and http on the rest?

Firstly, I would like to remove the www. from my domain name http://www.example.com => http://example.com I would also like for certain directories to be secure (https), while the rest remain http http://example.com/login =>…
Anthony
  • 657
  • 2
  • 10
  • 21
11
votes
5 answers

Redirect www to non-www with S3/CloudFront without seperate buckets

I'm hosting a static websites on S3 with CloudFront. Now, both www.example.com and example.com return the same, but I only want example.com to work, and www.example.com to redirect to example.com. I know I can create an another bucket that will…
Theodore
  • 1,683
  • 2
  • 12
  • 13
10
votes
7 answers

GAE naked to www custom domain mapping does not work

I setup a custom domain on GAE using the tutorial at aral balkan to access http;//app.apspot.com at http://app.com. (I can access the app at www.app.com) The tutorial is pretty old(Sep 2008) and it mentions Add four Hostnames for the naked domain…
abel
  • 2,377
  • 9
  • 39
  • 62
9
votes
5 answers

URL Rewrite to remove www and redirect to https using web-config (c# .net)

I have the following code in my web-config to be able to redirect both the URLs with the prefix "www" and non-SSL requests to the https:// mydomain.com because the SSL certificate is registered to the domain without the www
7
votes
3 answers

Github pages redirect non www (root domain) to www subdomain

I have build a website for github pages with jekyll. I setted it up and everything seems to be fine, and my custom domain www.domain.tld is working. But when I enter domain.tld in the browser, it loads for an infinite time. Now I want to redirect…
Nikurasu
  • 71
  • 1
  • 3
7
votes
2 answers

how to redirect www subdomain to non-www when domain is redirected to www

My primary domain is currently permanently redirected to www.mydomain.com (non-www to www redirection), with .htaccess as follows: RewriteCond %{HTTP_HOST} ^mydomain.com$ RewriteRule ^/?$ "http\:\/\/www\.mydomain\.com\/" [R=301,L] RewriteCond…
hello
  • 351
  • 3
  • 4
  • 16
7
votes
2 answers

Redirect https to non-www and http to www

I need a combination of redirects to achieve the following: To redirect http://example.com to http://www.example.com, while redirecting https://www.example.com to https://example.com. I would like to force the www prefix do the domain name when the…
Zarco
  • 81
  • 1
  • 2
6
votes
4 answers

Is the www subdomain good practice?

I know it is good practice to keep your website entirely 'http://www' or http://, and i'm also aware the www is just a subdomain. The main question I have is Which one of these would be the best choice? I'm configuring an htaccess for one of my…
Jonathan
  • 996
  • 1
  • 7
  • 27
5
votes
1 answer

.htaccess: non www to www (with https) shows ssl_error_bad_cert_domain in Firefox

I have a problem with redirections and didn't find a solution on the whole web... The right domain is: https://www.fit-for-easa.com The following redirections DO work: http://fit-for-easa.com to…
5
votes
4 answers

network solutions to heroku non-www redirection to www domain

This is a very specific question I have regarding redirection of a domain on network solutions to a webapp hosted on heroku. I have already set up so that in CNAME Records, Allias www refers to hostname in heroku. The question is, currently if I…
user1425114
1
2 3
17 18