Forum Moderators: phranque

Message Too Old, No Replies

URL issue affecting SEO rankings

seperate ips or update rewrite rules

         

dirtymonkey

7:04 pm on Nov 24, 2010 (gmt 0)

10+ Year Member



Hi Jim, I hope your well.

I'm not sure why as I haven't made any config changes to my hosting environment with the exception of updating to Plesk 9.5.3 but I'm suddenly getting the following issue:

My main website domain mywebdomain.com is on the same IP as my server / Plesk which is named server001b.mywebdomain.com to access the Plesk control panel I use server001b.mywebdomain.com:8443

server001b.mywebdomain.com has started appearing to visitors to my website when browsing my website which apart from looking bad also will be affecting my SEO rankings.

I'm wondering how I stop this whilst still maintaining access to the Plesk CP.

Current rewrite rules below.

Thanks in advance.

########## Begin - Rewrite rules to enhance SEO SEF
#
# Externally redirect to canonical hostname, preserving the original
# request's http/https protocol, but excluding xmlrpc requests.
RewriteCond $1 !xmlrpc [NC]
RewriteCond %{HTTP_HOST} ^(mywebdomain\.com|www\.mywebdomain\.com(\.|\.?[0-9]+)$) [NC]
RewriteCond %{SERVER_PORT}>s ^(443>(s)|80>s)$
RewriteRule ^(.*)$ http%2://www.mywebdomain.com/$1 [R=301,L]
#
########## End - Rewrite rules to enhance SEO SEF


I have attempted to guess what it the rewrite rules might be but then I wondered if the answer may be something to do with the port numbers... as you can probably tell I still don't know what I'm doing.

########## Begin - Rewrite rules to enhance SEO SEF
#
# Externally redirect to canonical hostname, preserving the original
# request's http/https protocol, but excluding xmlrpc requests.
RewriteCond $1 !xmlrpc [NC]
RewriteCond %{HTTP_HOST} ^(mywebdomain\.com|www\.mywebdomain\.com(\.|\.?[0-9]+)$) [NC]
RewriteCond %{HTTP_HOST} ^(server001b\.mywebdomain\.com|www\.mywebdomain\.com(\.|\.?[0-9]+)$) [NC]
RewriteCond %{SERVER_PORT}>s ^(443>(s)|80>s)$
RewriteRule ^(.*)$ http%2://www.mywebdomain.com/$1 [R=301,L]
#
########## End - Rewrite rules to enhance SEO SEF

g1smd

8:48 pm on Nov 24, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Be aware that:

mywebdomain\.com|www\.mywebdomain\.com


simplifies to

(www\.)?mywebdomain\.com


and so on.

dirtymonkey

12:52 am on Nov 26, 2010 (gmt 0)

10+ Year Member



Thanks g1smd noted.

Anyone got any ideas on initial issue? eager to resolve asap. ta.

jdMorgan

4:39 pm on Dec 1, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try this:

# Externally redirect all non-blank non-canonical requests to canonical hostname, preserving
# the original request's http/https protocol, but excluding xmlrpc and admin requests on port 8443.
RewriteCond %{HTTP_HOST} !^(www\.mywebdomain\.com)?$
RewriteCond $1 !xmlrpc [NC]
RewriteCond %{SERVER_PORT} !=8443
RewriteCond %{SERVER_PORT}>s ^(443>(s)|80>s)$
RewriteRule ^(.*)$ http%2://www.mywebdomain.com/$1 [R=301,L]

I used port 8443 as the test for "admin" control panel access, since you did not specify any other selection criteria.

Jim

dirtymonkey

7:50 pm on Dec 1, 2010 (gmt 0)

10+ Year Member



Hi Jim,

Good to hear from you. Thanks for finding the time to get back to me.
1st impressions look good I think the issue has been resolved. :)

Many thanks!