in the robots.txt in the root of your main domain. All bots that have manners will accept this, but depending on the frequency they visit your site you might have to wait a bit before the search engines update their datbases.
Additionally you could add a .htaccess with a redirect rule to /siteB/... that redirects requests that have been done using the siteA domain to http://siteB/... This will make everyone use the canonical domain even if they browse to the lesser-favored one.
发布评论
评论(1)
添加一个即可
只需在主域根目录的 robots.txt 中 。所有有礼貌的机器人都会接受这一点,但根据它们访问您网站的频率,您可能需要等待一段时间,搜索引擎才会更新其数据库。
此外,您可以将带有重定向规则的 .htaccess 添加到 /siteB/...,将使用 siteA 域完成的请求重定向到 http ://siteB/...这将使每个人都使用 规范 域,即使他们浏览到不太受欢迎的域。
Just put a
in the robots.txt in the root of your main domain. All bots that have manners will accept this, but depending on the frequency they visit your site you might have to wait a bit before the search engines update their datbases.
Additionally you could add a .htaccess with a redirect rule to /siteB/... that redirects requests that have been done using the siteA domain to http://siteB/... This will make everyone use the canonical domain even if they browse to the lesser-favored one.