Teach you to prevent others from resolving your domain name to your independent IP

Source: Internet
Author: User
Keywords Prevent

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

If your site is a stand-alone server or stand-alone IP virtual host, you can generally use IP direct access to the site, all domain names as long as the resolution to your IP can access your site. If some messy domain names are resolved to your IP, so that the search engine will include a lot of domain names and your domain name the same content, so that the SEO optimization is very disadvantageous, the old webmaster Xrnic have many customers are using the independent IP virtual host, for this I organized a related tutorial, After a close test, the solution is released for everyone to use:

1. If it is a Linux host, the workaround:

Sets the. htaccess file. Add the following code to the. htaccess file:

Rewriteengine on

Rewritecond%{http_host} ^ Other people's domain name. com$ [OR]

Rewritecond%{http_host} ^www. Other people's domain name. com$

Rewriterule ^ (. *) $ http://www. own domain name. com/$1 [r=301,l]//You can also casually fill in a non-existent URL.

2. If it is a Windows Virtual host can not operate.

You need server administrator privileges to configure the 301 redirection to complete.

(1) Open Internet Information Services Manager and right-click on the page or directory you want to redirect.

(2) Select Redirect to URL.

(3) in the Redirect to input box, enter the URL address of the destination page you want to jump to.

(4) Select Permanent redirect for resources.

(5) Finally click "Apply".

The above tutorial is actually mainly for Linux host use more convenient, if we have a better way to send to share with you. This article by www.xrnic.cn finishing in ADMIN5 release, reprint please keep all, thank you!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.