Title: CNAME and DM example
Last modified: August 21, 2016

---

# CNAME and DM example

 *  Resolved [JohnM](https://wordpress.org/support/users/jmanko/)
 * (@jmanko)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/cname-and-dm-example/)
 * I’m looking for both a CNAME and Domain Mapping example. My configuration is 
   not mapping my domain, instead it’s doing a permanent redirect.
 * My configuration is as follows:
 * **For mydomain.com CNAME record**:
 *     ```
       Host Name = *
       Address = otherdomain.com
       ```
   
 * **My DM for mydomain.com**:
 *     ```
       Site ID = 2 (site1.otherdomain.com)
       Domain = mydomain.com
       Primary = NO
       ```
   
 * **My DM Options**:
 *     ```
       Server CNAME domain [otherdomain.com]
       [X] Remote Login
       [ ] Permanent redirect (better for your blogger's pagerank)
       [X] User domain mapping page
       [X] Redirect administration pages to site's original domain (remote login disabled if this redirect is disabled)
       [ ] Disable primary domain check. Sites will not redirect to one domain name. May cause duplicate content issues.
       ```
   
 * **My .htaccess**:
 *     ```
       # BEGIN WordPress
       RewriteEngine On
       RewriteBase /
       RewriteRule ^index\.php$ - [L]
   
       # add a trailing slash to /wp-admin
       RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
   
       RewriteCond %{REQUEST_FILENAME} -f [OR]
       RewriteCond %{REQUEST_FILENAME} -d
       RewriteRule ^ - [L]
       RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
       RewriteRule ^(.*\.php)$ $1 [L]
       RewriteRule . index.php [L]
       # END WordPress
       ```
   
 * [http://wordpress.org/plugins/wordpress-mu-domain-mapping/](http://wordpress.org/plugins/wordpress-mu-domain-mapping/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Ron Rennick](https://wordpress.org/support/users/wpmuguru/)
 * (@wpmuguru)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/cname-and-dm-example/#post-4110763)
 * Your WP configuration doesn’t have any affect on whether you use an A record 
   or a CNAME. Either method is just the means by which the request gets directed
   to your web server.
 *  Thread Starter [JohnM](https://wordpress.org/support/users/jmanko/)
 * (@jmanko)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/cname-and-dm-example/#post-4110769)
 * Ok. So, does the DM config look ok?
 *  Thread Starter [JohnM](https://wordpress.org/support/users/jmanko/)
 * (@jmanko)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/cname-and-dm-example/#post-4110779)
 * The wordpress options table does not contain any “dm_%” values. Where are those
   stored?
 *  Thread Starter [JohnM](https://wordpress.org/support/users/jmanko/)
 * (@jmanko)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/cname-and-dm-example/#post-4110882)
 * So I issued a GET request via the command line, and a 302 is sent by the server:
 *     ```
       $ telnet www.mydomain.com 80
       Trying IP.IP.IP.IP ...
       Connected to www.mydomain.com.
       Escape character is '^]'.
       GET / HTTP/1.1
       host: www.mydomain.com
   
       HTTP/1.1 302 Moved Temporarily
       Date: Tue, 10 Sep 2013 03:02:00 GMT
       Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
       Pragma: no-cache
       X-Pingback: http://site1.otherdomain.com/xmlrpc.php
       Set-Cookie: PHPSESSID=4cc5b84514446373c43349158546f87a; path=/; domain=.mydomain.com; HttpOnly
       Location: http://site1.otherdomain.com/
       Content-Length: 0
       Content-Type: text/html; charset=UTF-8
   
       Connection closed by foreign host.
       ```
   
 * This was AFTER I changed my DNA entry from a CNAME record to A Record pointing
   to the otherdomain.com IP.
 * Is there any way to retain mydomain.com in the URL bar instead of showing the
   redirected site1.otherdomain.com?
 *  Plugin Author [Ron Rennick](https://wordpress.org/support/users/wpmuguru/)
 * (@wpmuguru)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/cname-and-dm-example/#post-4110949)
 * > Is there any way to retain mydomain.com in the URL bar instead of showing the
   > redirected site1.otherdomain.com?
 * > Site ID = 2 (site1.otherdomain.com)
   >  Domain = mydomain.com Primary = NO
 * If you want it to stay in the address bar make it the primary URL.
 *  Thread Starter [JohnM](https://wordpress.org/support/users/jmanko/)
 * (@jmanko)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/cname-and-dm-example/#post-4110957)
 * Works! Thank you for your patience! 🙂

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘CNAME and DM example’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wordpress-mu-domain-mapping.svg)
 * [WordPress MU Domain Mapping](https://wordpress.org/plugins/wordpress-mu-domain-mapping/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-mu-domain-mapping/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-mu-domain-mapping/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-mu-domain-mapping/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-mu-domain-mapping/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-mu-domain-mapping/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [JohnM](https://wordpress.org/support/users/jmanko/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/cname-and-dm-example/#post-4110957)
 * Status: resolved