twoconk
V2EX  ›  问与答

我的网站被其他域名访问,有什么办法?

  •  
  •   twoconk · Feb 3, 2016 via Android · 1749 views
    This topic created in 3835 days ago, the information mentioned may be changed or developed.
    我的网站 http://iscxy.com 刚上线就发现 http://cd360.tv/ 也能访问,刚开始没注意,最近发现在百度关键词搜索后,这个域名还排在 iscxy.com 前面,也不是 dns 跳转,难道是抓取后缓存?有什么办法么?
    29EtwXn6t5wgM3fD
        1
    29EtwXn6t5wgM3fD  
       Feb 3, 2016 via Android
    直接访问你网站 ip 是什么样
    twoconk
        2
    twoconk  
    OP
       Feb 3, 2016 via Android
    @shengyu ip 访问没有问题 ,和域名访问一样的
    jsq2627
        3
    jsq2627  
       Feb 4, 2016
    在你 nginx 配置里 server_name 指明绑定域名,这样其他域名绑定到这个 IP 上就访问不了了。
    此外最好在前端 JS 也判断一次当前域名,如果不正确那就跳转回正确的域名。
    twoconk
        4
    twoconk  
    OP
       Feb 4, 2016 via Android
    @jsq2627 感谢, servername 指定过了
    js 判断应该是个办法,回头试试
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3353 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 10:44 · PVG 18:44 · LAX 03:44 · JFK 06:44
    ♥ Do have faith in what you're doing.