Jump to content

[SOLVED] Detecting domain?


Azu

Recommended Posts

Would somebody please tell me how I can use PHP to detect the domain that is being used? Or just detect the full URL? Because I have more then 1 domain and I want to redirect the others to the first one, so that google won't think I am using duplicate content and penalize me for it.

 

So like either a way to detect what the domain is (E.G. domain2.com) so that I can redirect to domain1.com

 

Or just a way to detect if it ISN'T domain1.com, and redirect to domain1.com if it isn't?

 

Because I like to register more then 1 domain for common misspellings, like the way google has gooogle.com redirect to google.com

 

So.. please tell me how I can somehow detect this in PHP I would appreciate it thanks ^^

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.