Domain Aliases? domain.com and domain.net both browse same root without redirect?

11 replies
Hey All,

Trying to see how this can be done...

2 domains
.com and .net ... or whatever.

Main domain is domain.com
I setup a pointer of domain.net - it redirects to .com

How can I set it up so it does NOT redirect.

If the user hits either domain.com or domain.net they browse the root directory WITHOUT it redirecting and changing the URL in the address bar.

I know this can be done, just not sure how. I have setup a pointer and it only redirects, I'm thinking maybe something with .htaccess?

Any Ideas? Thanks in advance

cheers.
#aliases #browse #domain #domaincom #domainnet #redirect #root
  • Profile picture of the author theIMgeek
    This set-up is commonly called a parked domain. Many web hosts will let you park a domain, and it will become interchangeable with the main domain. Both will point to the same files.

    However, make sure there's a good reason to do this. You are essentially creating a duplicate site that can diminish your search engine placement.

    -Ryan
    Signature
    FREE WSO: Protect and Automatically Deliver Your Digital Products

    Ask the Internet Marketing Geek
    <-- Happy to help with technical challenges
    MiniSiteMaker.org <-- Free software to make your mini-sites fast and easy
    {{ DiscussionBoard.errors[2691666].message }}
    • Profile picture of the author CarloD.
      Dupe content is no issue,

      I have setup a parked domain, and a pointed domain,
      Both redirect to the initial blog URL, I was told this could be wordpress doing the redirect, any ideas of how I can address this?

      So end result both domain pointers and parked domains still redirect and I believe its a wordpress things now...any ideas?

      thanks
      Signature

      {{ DiscussionBoard.errors[2691817].message }}
  • Profile picture of the author theIMgeek
    You're right, it is Wordpress. This is hard coded into to the software so that domain.com automatically get redirected to www.domain.com.

    I did look up a way to disable this. add this line to the functions.php file located inside your active template folder.

    Code:
    remove_filter('template_redirect','redirect_canonical');
    Hope that does it!

    -Ryan
    Signature
    FREE WSO: Protect and Automatically Deliver Your Digital Products

    Ask the Internet Marketing Geek
    <-- Happy to help with technical challenges
    MiniSiteMaker.org <-- Free software to make your mini-sites fast and easy
    {{ DiscussionBoard.errors[2691953].message }}
  • Profile picture of the author CarloD.
    I'll try it out when I get home.

    cheers
    Signature

    {{ DiscussionBoard.errors[2692795].message }}
  • Profile picture of the author CarloD.
    I tried this and no luck, I have 3 other domains, 2 setup as pointers and one parked, and in both cases the one liner did not work.

    I also added it as a plugin, with no luck either. Perhaps its because WP 3+ this was created back around wp2.3....

    To determine if it was working at all, i just hit:
    www.domain.com which by default goes to domain.com after enabling plugin/adding code outcome was the same.
    Signature

    {{ DiscussionBoard.errors[2695275].message }}
  • Profile picture of the author SteveJohnson
    You can't "address this" because the domains are hardcoded into the WordPress database. The only way you'll be able to do it is to maintain two databases, one for each domain, and write an update script to swap out the domain names.

    Not very practical.

    Canonical redirects have nothing to do with your objective. The canonical redirect function handles inclusion or exclusion of "www" in URLs
    Signature

    The 2nd Amendment, 1789 - The Original Homeland Security.

    Gun control means never having to say, "I missed you."

    {{ DiscussionBoard.errors[2695298].message }}
    • Profile picture of the author CarloD.
      Ya I agree,

      However the one liner/plugin did not work for canonical links either.

      Thanks for the input, much appreciated.
      Signature

      {{ DiscussionBoard.errors[2695390].message }}
  • Profile picture of the author jminkler
    hmm .. still fail to see the purpose of this ... why is there no dup content again?
    {{ DiscussionBoard.errors[2714419].message }}
    • Profile picture of the author CarloD.
      Originally Posted by jminkler View Post

      hmm .. still fail to see the purpose of this ... why is there no dup content again?

      there isn't much purpose, It's what the client wants... Although I don't think they will be using this anymore,
      Signature

      {{ DiscussionBoard.errors[2715360].message }}
  • Profile picture of the author circus_freak
    use setting redirect domaain on cpanel
    {{ DiscussionBoard.errors[2714657].message }}
  • Profile picture of the author lucasdean123
    This set-up is commonly addressed a parked domain. Many web hosts will let you park a domain, as well as it will turn exchangeable with the main domain. Both will point to the same files.
    {{ DiscussionBoard.errors[2728328].message }}

Trending Topics