Forums

Two domains pointing to the same instant of WP (6 posts)

  1. Seriously Green
    Member
    Posted 1 year ago #

    We have been searching Google for days for a solution but we cannot find a good document for direction.

    We need to have two or 3 domains to point to the same portal in WordPress. We have done this kind of setups numerous times in IIS and ASP.net sites so I am sure there is a simple solution that we cannot find because we are new to WP. I know this is not SEO - but We do need to point to certain products with an SEO domain name like myproductname.com

    Furthermore, we are not sure if it is a WordPress problem or if it is the way Plesk works in 1and1 virtual server. So please bear with us.

    Here is what we did:-

    Created a WordPress site domain1.com and all works perfect with one domain.

    In parallels Plesk Panel created a domain alias domain2.com and it points to the same IP address

    Synchronize DNS zone with the primary domain This DNS server acts as a master name server for this DNS zone.

    Mail >> Mail service is switched on for the domain. mail.domain1.com. used as mail server.

    Web >> Domain has Web hosting on IP address 74.111.111.111

    Java Web applications >>> Java application service (Tomcat) is not installed.

    In WordPress 3.1 we setup the network admin

    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', true );
    $base = '/';
    define( 'DOMAIN_CURRENT_SITE', 'domain1.com' );
    define( 'PATH_CURRENT_SITE', '/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );

    Also

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]

    But what we have now is

    http://domain2.com >> goes to >> http://domain1.com/wp-signup.php?new=edenaromata.com
    However,

    What we have for example - http://domain1.com/category/saffron-recipes/ We also need for the second domain to go to same page >> http://domain2.com/category/saffron-recipes/

    I am fairly sure we have not configured it right. If I was doing it in a windows environment >> I would have to add domain1 and domain2 to the same portal in IIS – then in which ever app I am using, DNN, or any other ASP.net app, I would have to add both domains so the app also recognizes them. In this environment I am a little naive.

    If you see anything we have done wrong or missed out please let us know. I thank you in advance for taking a look.

    Sal

  2. Andrea_r
    team pirate
    Posted 1 year ago #

    Yes, you;re trying to send domains to *categories*.

    Network admin is for separate blogs/sites. When you want to use more than one domain, you create new sites in the admin area and put your content in there. Then you do the domain alias stuff above AND you also use this plugin:
    http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/

    then in wordpress map domains to each site.

  3. Seriously Green
    Member
    Posted 1 year ago #

    Thank you very much Andrea

    I will have a good look at MU Domain Mapping. I was under the impression that this is for legacy WordPress as the new WordPress 3.x handles this out of the box. But I guess that was a misunderstanding on our behalf

    I will check this later today.

    Sal

  4. Andrea_r
    team pirate
    Posted 1 year ago #

    No, WordPress does not handle domain mapping out of the box.

    What *was* wpmu is now built in. But not domain mapping. It says wpmu in the plugin name because those titles cannot be changed.

  5. Seriously Green
    Member
    Posted 1 year ago #

    Finally had some time to do the following

    We are planning to make two domain names pointed to same instance of wordpress.

    For example,
    http://DomainName.com/category/blog/ and http://alias.eotherDomain.com/category/blog/
    to point to same page.

    This is not as re-direct and it is so that the user that has come with alias.otherdomain can continue browsing the rest of the site with the alias.otherdomain name.

    So we have installed Network Admin Plugin and WordPress MU Domain Mapping Plugin. But it seems this approach is only for to manage multiple sub-domains under the single network.

    And also the plugin require individual wordpress installation for each sub-domains in the network.

    We have also tried with .htaccess file to re-directing one domain to another domain. But still we didn’t got the feasible solution for this. it was done like this

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^abc\.net [nc]
    RewriteRule (.*) http://xxx.yyy.com/$1 [R=301,L]
    Right now we removed this code from .htaccess file

    But it did not work so we took it out and as it stands if we try to go to http://alias.eotherDomain.com
    we end up in:
    http://DomainName.com/wp-signup.php?new=alias.otherdomain.com

    I really appreciate if you could point me to a documentation or a resource to explain if this is possible?

    Sal

  6. Andrea_r
    team pirate
    Posted 1 year ago #

    And also the plugin require individual wordpress installation for each sub-domains in the network.

    this is incorrect. Individual installs are *not* required. that's what the multisite ability gives you - hundreds of sub sites in one install.

    what you wnat is possible in the way I described - not in the way you;re doing it. ;)

    Don't make categories off the main site to map domains to.
    make a new site in the network. map the domain to that.
    Don't do redirects.

Topic Closed

This topic has been closed to new replies.

About this Topic