Remove www from mirrored subdomain?


#1

Is it possible to automatically remove the www. from a subdomain I have mirroring a site hosted by DH?

For example, I set up example.com as a fully hosted domain. I set it so www.example.com redirects to example.com. Click “Fully Host this Domain.” No problem. The www. is outta here.

Next, I want to set up the subdomain: this.example.com and mirror the files at example.com. I go to the “Mirror” section in the admin panel, and enter this.example.com. Select example.com as the mirror. Click “Mirror.” So far, so good. this.example.com mirrors example.com. So does www.this.example.com and herein lies the issue.

When I head on over to www.this.example.com I want to lose the www and have it appear in the browser as simply this.example.com. Can’t figure out how to do that. Any help? Is this possible? Thanks!


#2

It looks like that’s not possible. Yet. I don’t see it in the suggestion box, so maybe you can submit that as a suggestion.

-Scott


#3

Well, there’s no way to do it from the panel at least. Easy enough to do with a mod_rewrite rule, though:

RewriteCond %{HTTP_HOST} =www.this.example.com RewriteRule ^(.*) http://this.example.com$1is pretty much all we’re doing when you click “no WWW” anyway.


#4

Sorry if i sound like a comple loon, but where would i place the abovementioned code if i wish to remove the www?

Many thanks in advance
Zill


#5

you would create a file called .htaccess (yes there is a period) and put the code in there. then upload it to the this.example.com folder (i.e. whatever your sub-domain or domain happens to be that you want this to work for).


#6

Okey dokes, i’m now a tad wiser, many thanks mate.

The reason i ask is that i have a domain which is already using the www prefix (lets say: www.example.com) it’s hosted/pointed elsewhere, but i want to add gmail to example.com (which it doesnt provide) so i hosted example.com (without the www. prefix) here at dreamhost (i have a few other domains here btw, but i digress) but when i set the hosting/dns dreamhost automagically points example.com to www.example.com and will not allow me to change the www a name record (in this case www A 6x.1x3.1xx.1x3)

Any thoughts on ow i might go about removing the www A name record in dreamhost?, bearing in mind i have NO access to the www.example.com directory at the other host but they DID state this (i use example.com again in the quoted text below):

“The Primary Domain Name MUST NOT be a domain name which you are planning on using for email purposes. For eg., if your domain name is example.com and you have or want to create email addresses of the type example@example.com, DO NOT use example.com as your Primary Domain Name. Instead use a subdomain like www.example.com or shop.example.com, etc. This is because in the next step you will be adding a CNAME record for this domain name and technically a domain name for which a CNAME record is made, cannot be used for email purposes”.

It goes on to say in the next step:

"Point the Primary Domain Name you chose above (www.example.com) to our server using a CNAME record pointing to example.super.abcmyorder.com (domain names changed for privacy guys). So if you chose www.example.com as your Primary Domain Name then you should add the following CNAME record:

www.example.com IN CNAME example.super.abcmyorder.com

NOTE: It is important that you use a CNAME record above and NOT an A record".

I hope this helps describe my conundra more explicitly, it is doing my head in from this end LOL

One last pont, the domain has three prefixes already pointed to by a free nameserver and they work just fine, they are:
sales.example.com
www.example.com
shop.example.com

There is no entry for example.com so i believe my real problem lays with the redirect to www by dreamhost.

Sorry it’s become a long winded email, i truly appreciate beaing able to talk to someone about it though =)

Many thanks again dood.

Zill


#7

I think you are making this more complicated than it should be. You cannot have www.example.com and example.com going to two different places. You can change the requirements to either force your visitors to use the www or not but the files are served from the same location.

You are making this harder than it should be. Is the domain name you are using fully hosted and pointed to DH name servers or are you using a different host’s name servers? If you are using DH it is a simple matter of going to manage domains and editing it. You just check the box under google hosted services for gmail and hit change settings.

If your domain is using another host’s name servers you need sign up for the google hosted email service yourself and add mx records to get it actually working with your domain name. It can be done because DH didn’t always have such a handy option for domains to use gmail and I had to set up the records myself for one of my domains.


#8

Ahhh, but the point is i have a www pointed elsewhere that is/was working and the example.com i wanted to be available here, so i eventually found out it is possible to do…

And here’s the trick…

Ask support. LOL

I searched the forum and found this post ( http://discussion.dreamhost.com/thread-57444.html ) which told me that non-editable DNS entries could only be “jiggled” by DH staff, so within a few hours my domain example.com is hosted here and my www.example.com is pointing (and working) elsewhere.

Neat eh?, thanks for your replies, appreciate your efforts and input.

Safe travels always dood
Zill

If your domain is using another host’s name servers you need sign up for the google hosted email service yourself and add mx records to get it actually working with your domain name. It can be done because DH didn’t always have such a handy option for domains to use gmail and I had to set up the records myself for one of my domains.
[/quote]