Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have more than one (4 to be exact) domains and only one server host with same ip. How I can run all my domains from same server. All websites are wordpress sites.

share|improve this question

migrated from wordpress.stackexchange.com Feb 14 '12 at 18:48

This question came from our site for WordPress developers and administrators.

    
This is a server configuration issue. Whether all the sites are WordPress or not doesn't make a difference in this context ... migrating to Webmasters Stack Exchange where it will be more on-topic. –  EAMann Feb 14 '12 at 18:48
add comment

2 Answers 2

If you are running Apache on your web server then you should use Name-Based Virtual Hosting, which is explained in the Apache Documentation.

share|improve this answer
1  
I reluctantly gave an upvote. Your answer would be a lot better if you could give a paraphrased summary of the link and/or provide some sample configurations to demonstrate how it's done. –  Evan Plaice Feb 14 '12 at 20:25
add comment

I use the following code in the htaccess file to manage my wordpresses with multiple domains all pointing to the same site (though this isn't wordpress specific).

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com$ [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=301,L]

Basically this redirects any domain that isn't yourdomain.com to yourdomain.com.

This way you avoid any crossdomain violations (with embedded fonts for example), all your sites are accessible from all domains but you only have a single root domain so far as users, bookmarks and search engines are concerned.

You may also want to read this google webmaster blog on canonical urls.

share|improve this answer
    
I won't downvote but this doesn't answer the question. I think what the op is referring to is multiple subdomains on a site, not multiple subdomains pointing to one subdomain. Ex. site.com, blog1.site.com, blog2.site.com, blogs.site.com, mail.site.com (webmail), admin.site.com, www.site.com (redirects to site.com), etc... –  Evan Plaice Feb 14 '12 at 20:24
    
@EvanPlaice well, i don't see where you get sub domains from since the question doesn't mention them but re-reading the question you could be right it's not terribly clear. –  toomanyairmiles Feb 14 '12 at 20:28
    
Here's what I grok'd. 1 domain name, 1 host, multiple sites. If the host is running an Apache server that would mean adding subdomains using Virtual Hosts in httpd.conf. In some other type of hosting framework (ex Google App Engine) it would probably mean adding sub-domain handles to the config/router. –  Evan Plaice Feb 14 '12 at 20:35
    
@EvanPlaice you could well be right I took the plural websites and sites to be bad English. –  toomanyairmiles Feb 14 '12 at 20:39
    
He says "All websites are Wordpress sites" which implies they are set up as separate sites, not just several domains pointing to the same site. I removed the redirect tags since the question doesn't appear to be about that. –  DisgruntledGoat Feb 15 '12 at 14:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.