• greglgomez

    (@greglgomez)


    Hi there guys,

    wondering if anyone can help me solve this conundrum..

    Basically I want to offer my clients a way of accessing their website before they turn over their DNS.
    An example would be:
    clientdomain.mydomain.com and clientdomain.com

    Now I know I’ve heard that such a thing could damage SEO, but the subdomain access would be more of a utility thing, is there a way of not search engines not tracking this second domain since it’s not for public use?

    Is this possible to do? and is it possible to do this in a way that preserves the URL? ie: stopping “clientdomain.mydomain.com/wp-admin” redirecting to “clientdomain.com/wp-admin”

    Thanks in advance for any help!

Viewing 1 replies (of 1 total)
  • neauxway

    (@neauxway)

    I do something similar to this for most sites I develop.
    During the development process, I use client.mydomain.com and when I cut over to the live site, I switch the domain to clientdomain.com

    When I am doing development, I set the domain in Settings -> General to client.mydomain.com and in Settings -> Reading, I set “Search Engine Visibility” to “Discourage search engines from indexing this site”, which manages the robots.txt request from incoming search engines. You do this so your subdomain doesn’t show up in search for the clients website.

    When I go live, I point clientdomain.com to the site, uncheck the search engine visibility setting and run this script from the WP root (after I back up the database, of course):

    http://clientdomain.com/searchreplacedb2.php

    This great script is critical for doing this, which search and replaces strings. In this case you tell it to replace all instances of client.mydomain.com to clientdomain.com in the database. Once completed, you are ready to roll.

    This script can be downloaded from:
    https://github.com/jmandala/searchreplacedb2

    A caution, though. Remove this from the web root IMMEDIATELY after running, since you don’t want an external visitor running this.

    I do recommend disconnecting your subdomain from the site after you’re done. You don’t want Google to punish the site for duplicate content. You won’t need the old subdomain once you go live.

Viewing 1 replies (of 1 total)
  • The topic ‘How to access wp site via a domain and a subdomain’ is closed to new replies.