对于设置301重定向有很多好处,其中之一就是利于seo防止搜索引擎误操作将多域名站点设置为作弊站点,同时也减少权重分散,像访问www.ihuan.me/1046.html则会被跳转到ihuan.me/1046.html增强流量的汇集。具体方法如下。

1.新建一个站点,对应目录如D:\wwwroot\301web。该目录下只需要1个文件,即index.html或者加个404.htm。绑定要跳转的域名,如图:
2.在IIS中选中刚才我们建立的站点,右键,属性,主目录,选择重定向到,输入网址如:http://www.xxxx.com,同时注意选中下面的资源的永久重定向选项。如下图:
3.到此,我们已经完成了将xxxx.com这个域名301重定向到www.xxxx.com的工作。
注意问题:
“上面输入准确的 URL(X)”这个选项建议不要选。
不选的结果是:
当输入xxxx.com转到了www.xxxx.com,
当输入xxxx.com/sanwen/suibi/时,转到了www.xxxx.com/sanwen/suibi/。
选上的结果是:
当你输入xxxx.com或者xxxx.com/sanwen/suibi/都会转到www.xxxx.com。
好了,如果只是想把不带www的转到带www的或者其他没有用过的域名转到正在使用的域名,这样就可以了。但是如果你要的域名已经做过网站,想要把权重传递给新网站,可以参考下面这个方法:
第一步同上,主要是第二步,如图:
注意红色字体的部分,在重定向到地址的后面多了$S$Q字符,即写成了http://www.xxxx.com$S$Q。“上面输入准确的 URL(X)”这个选项也打了勾。
对于$S$Q字符,这里解释一下:
$S 将请求的URL 的后缀传递给新的URL。后缀是用重定向的URL 代替之后,初始URL 中所保留的部分。
如果未设置 EXACT_DESTINATION 标志,则结果目标URL 的名称将具有所请求文件的名称(作为文件夹名称)以及文件名本身。
$Q 将初始URL 中的参数(如 querystring 参数)传递至新的 URL,包括问号(?)。
如果不加上$S$Q字符的话,内页的301都会跳转到首页,加上$S$Q字符的目的就是内页也能准确的跳转到新域名的对应内页。
好了,这样就完成了301永久重定向的设置,设置好之后最好能测试下是否返回的是301值,推荐个网址:http://www.seoconsultants.com/tools/headers。
百度对301的反应并不像想象中那么慢,第二天就收录了xxxx.com这个页面,快照最新。当然,快照的内容是www.xxxx.com的内容,而不是301web里index.html的内容。
Incredible story there. What occurred after? Good luck!
2018年6月6日 08:11We’re a group of volunteers and opening a new scheme in our community.
2018年6月6日 05:02Your website offered us with valuable info to work on. You have done an impressive job and our entire community will be thankful to you.
Many thanks for being our lecturer on this theme.
2018年6月6日 03:04My spouse and i enjoyed your own article very much and most of
all liked the way you handled the aspect I regarded as controversial.
You happen to be always quite kind to readers really like me and aid
me in my lifestyle. Thank you.
Very good Web site, Maintain the fantastic work. Appreciate it.|
2018年6月6日 02:43I savor, result in I found just what I was looking for. You have
ended my four day long hunt! God Bless you man. Have a great day.
Bye
2018年6月5日 22:58Ηi excellent website! Does running a blog sucһ as this require a massive amount work?
2018年6月5日 21:50I have virtually no understanding of coding һowever I ѡas hoрing to start my own blоg in the near future.
Anyhow, if you have any ideas or techniques for new blog owners please share.
I understand this is օff topic but I simply wanteԀ to ask.
Thanks a lot!
Having read this I thought it was really enlightening.
I appreciate you spending some time and effort to put this article
together. I once again find myself personally spending way too much time both reading and commenting.
But so what, it was still worthwhile!
2018年6月5日 20:57Do you have a spam issue on this site; I also am a blogger, and I was wondering your
2018年6月5日 19:17situation; many of us have developed some nice
procedures and we are looking to swap solutions with others, be sure to shoot me an e-mail if interested.
Definitely believe that which you stated. Your favorite reason seemed
to be on the web the simplest thing to be aware of. I say to you, I certainly get annoyed while people consider worries that they plainly
do not know about. You managed to hit the nail upon the top and also defined out the whole thing without having side effect , people
can take a signal. Will probably be back to get more.
Thanks
2018年6月5日 16:50Greetings! I know this is kinda off topic however , I’d figured I’d ask.
Would you be interested in trading links or maybe guest authoring a blog article or vice-versa?
My blog discusses a lot of the same topics as yours and I feel
2018年6月5日 14:48we could greatly benefit from each other. If you are
interested feel free to shoot me an email. I look forward to hearing from
you! Wonderful blog by the way!