Need Help Redirecting NS1 and IP traffic to Main Domain

In my analytics I am seeing that a small percentage of search engine traffic is coming in via NS1.mydomain.com and also by way of the IP number (site is on a VPS with a dedicated IP).

Also, when "ns1.mydomain.com" is typed in a browser it loads the main site, rather than displaying a "not found" error. Is there a setting(s) that can be changed in Plesk (v.11) that will prevent these events from occurring or is placing a redirect code in the .htaccess file the best solution.

Thanks in advance!
Floridaguy
floridaguyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

edster9999Commented:
Create a default web site.  Set that up to send a '301' redirect to any page and direct that to the real web site.

Set up the real website and have that point to the real pages.

This way anything that lands on the site using a different address like 'ns1' or the IP will get directed to the real site and not steal any pagerank etc in search engines.
0
edster9999Commented:
0
floridaguyAuthor Commented:
I'll give that some consideration, edster9999.  

Appreciate your response!
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

floridaguyAuthor Commented:
I guess I'm a bit disappointed that there has not been more response on this. I've been a member since 2006 and very seldom ask a question.

Is there anyone else who can offer a solution?
0
edster9999Commented:
Still quiet - so I'll offer more help (feel free to jump in and help fellow-EE-helpers)

There are three possible options.

1. As above - you create a site that just handles the redirection.  If it is the default site it will get all traffic that is not to a named site.
You then create a named site (with the real web site name) and that handles the proper traffic.  Anything that goes to the default one gets a '301' back to the real site.

2. You could have just one site and with a little bit of clever '.htaccess' scripting you can sort out the redirection.  If someone goes into
http://10.20.30.40/pages/whatever
it can be redirected to :
http://www.yoursite.com/pages/whatever
(and the same for NS1 etc).
I don't like this solution as debugging lost users is hard.  Making changes is hard. And all the traffic will still show up in your log files so you'll have to split it back out or you'll end up with too many lines for each person.
IMO - not a good solution

3. PLesk has options in the menu to redirect sites.  You set up redirections from NS1 -> WWW etc etc.
What this really does is create a few lines in the apache file that really do option '1' above.  It is an easy way to set it up and manage it - but I like to take control and edit my own config files.

The only other option would be :

4. Don't do anything at all.... Just live with people getting to your site using the wrong name.
Not a great idea as it can eat away at your search engine (read that as google) rankings due to what it sees as duplicate pages.

'301' redirection is the only way to go.  use options 1 or 3 depending on if you like to edit files or edit in plesk menus

Thats it from me... I'll leave it open for anyone else to add / comment on this :)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
floridaguyAuthor Commented:
Can't thank you enough for your time on this, edster9999. I'll try to digest this some, and also wait for a while to see if anyone else checks in.
0
floridaguyAuthor Commented:
I'm not sure that I'm seeing the solution here that I'm seeking, but I wanted to award the points to you for the time that you put into this.

I'm still a bit disappointed that there were no other responses--I've done better on sites that don't even charge a membership. :(
0
edster9999Commented:
You could always try reposting it and wording it in a different way or asking a very specific question.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.