对于设置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的内容。
My spouse and I stumbled over here different web page and thought
2018年6月3日 05:37I should check things out. I like what I see so
i am just following you. Look forward to finding out about your web page repeatedly.
Pretty nice post. I just stumbled upon your blog and wished to say that I’ve truly enjoyed surfing around your blog posts.
2018年6月3日 05:25In any case I will be subscribing to your feed and I hope you write again very soon!
I’m really enjoying the design and layout of
2018年6月3日 03:32your website. It’s a very easy on the eyes which makes it
much more pleasant for me to come here and visit more
often. Did you hire out a developer to create your theme?
Outstanding work!
Wow, marvelous blog layout! How long have you been running a blog for?
2018年6月2日 21:15you make blogging look easy. The overall glance of your website is great, let alone the content!
After I originally left a comment I appear to have clicked the -Notify me when new comments are
2018年6月2日 18:03added- checkbox and from now on each time a comment is added
I receive four emails with the same comment. Perhaps there is an easy method
you are able to remove me from that service? Appreciate it!
My developer is trying to persuade me to move to .net from
2018年6月2日 17:39PHP. I have always disliked the idea because of
the costs. But he’s tryiong none the less. I’ve been using WordPress on various websites
for about a year and am worried about switching to another platform.
I have heard very good things about blogengine.net.
Is there a way I can import all my wordpress content into it?
Any help would be greatly appreciated!
I think everything typed made a bunch of sense. However, what about this?
2018年6月2日 13:18what if you were to write a killer title? I mean, I don’t wish to tell you how to run your website, however suppose you added something to possibly grab people’s
attention? I mean 301重定向设置,可以减少权重分散,防作弊降权 – 幻杀博客 is a little boring.
You might peek at Yahoo’s home page and note how they create news titles to grab people to
click. You might try adding a video or a picture or two to grab readers excited about everything’ve got to say.
In my opinion, it might bring your website a
little livelier.
Good day! Do you know if they make any plugins to help with
2018年6月2日 11:50Search Engine Optimization? I’m trying to get my blog to rank
for some targeted keywords but I’m not seeing very good gains.
If you know of any please share. Thanks!
I really wanted to post a brief note to be able to appreciate you for all the fantastic points you are writing at this website.
2018年6月2日 11:05My extensive internet research has at the end of the
day been honored with awesome knowledge to talk about with my family members.
I would mention that we site visitors actually are unquestionably lucky to live in a magnificent
site with so many perfect professionals with very beneficial pointers.
I feel quite grateful to have come across your webpage and look forward to really more entertaining minutes reading here.
Thank you once again for a lot of things.
Aw, this was an incredibly nice post. Spending some time and actual effort to produce a very good
2018年6月2日 06:17article… but what can I say… I procrastinate a whole lot and never seem
to get anything done.