Setting Up a Redirection from domain.com to www.domain.com

时间:2016-07-11 23:11:58

标签: redirect

I have a website. At this time, I can access this website if I visit http://www.example.com and http://example.com. When I run some validation tests, I get the following error:

There is duplicate content on http://www.example.com and http://example.com. This is bad, as technically they are classed as two different websites. Search engines may lower a website's rank if they find the same content on two different URLs. Choose one domain that you would like to use and then set a permanent (HTTP 301) redirect to forward users who visit the other.

My question is, how exactly do I fix this? Do I update the CNAME records? I don't fully understand how this mapping happens or why the addresses are even different.

1 个答案:

答案 0 :(得分:0)

我希望这适合你:

OFFSET... FETCH NEXT

您需要在.htaccess文件中添加此内容