The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Google listing FTP URLs

Discussion in 'General Discussion' started by bear, Jul 21, 2016.

  1. bear

    bear Well-Known Member

    Joined:
    Sep 24, 2002
    Messages:
    113
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Came to realize recently that Google seems to think it should be listing some links to my site like this: https://ftp.domain.com/resource . Apparently the way things are set up on Cpanel servers, it treats the ftp subdomain via http/browser as a normal way to access folders and files via http(s), and it still gets to the right folder...but it's causing problems.

    Apart from the SSL fail on that subdomain, links to that folder are breaking the licensed domain on the script in /resource since it was never set up or intended to use the ftp subdomain for anything. Unfortunately, I can't seem to be able to resolve this through Google (you can have them remove something temporarily, but it may come back), so I need to see about redirecting on the server level. First issue appears to be the SSL gets seen before any htaccess file, so it's killing the connection before any redirect can take place. Direct mod_rewrite and the like works if I go there without SSL, but that's not getting that far.

    Any thoughts on how to resolve this by (potentially) sending these requests off to the www subdomain instead? I don't need or want FTP through a browser, and would prefer it not answer to http(s) requests that come in to that. Ever.
     
  2. SageBrian

    SageBrian Well-Known Member

    Joined:
    Jun 1, 2002
    Messages:
    415
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    NY/CT (US)
    cPanel Access Level:
    Root Administrator
    what if you just remove the cname for ftp, so ftp.domain.com doesn't resolve anymore?
     
  3. bear

    bear Well-Known Member

    Joined:
    Sep 24, 2002
    Messages:
    113
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Thanks, but there is no CNAME record. By default, accounts get set up with FTP pointing to the same IP as the main domain it's connected to. I'd assume because of that, the webserver assumes ftp.domain.com is simply another way of reaching domain.com or www.domain.com, so happily shows folders/files if asked.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,787
    Likes Received:
    665
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  5. bear

    bear Well-Known Member

    Joined:
    Sep 24, 2002
    Messages:
    113
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    I suppose I don't quite follow how this relates. In that linked thread, they state that if there is no index file in the document root, that exposes all folders to Google and the world. There is not only an index file, but we disallow directory indexing server wide, and this is finding pages via ftp.domain.com which is not listed anywhere on the site, ever, as a means of reaching content.
    Also not following how editing the zone template will change what's happened? The domain in question is on a dedicated IP (so FTP would resolve there too, obviously), and pages are being requested/served on the perceived subdomain of "ftp". Since FTP in the DNS record points to the IP of the account via A record....what change would resolve this issue permanently and not disrupt actual FTP?

    I've taken steps to redirect HTTP requests like this, but if Google feels FTP is a valid thing to spider, it's going to come up again, I should think, and not only involving my site.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,787
    Likes Received:
    665
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You could remove the "A" record for "ftp" and advise your customers to access FTP using the domain name itself, or any host that resolves to the server's IP address. However, keep in mind this is more of a function of how Google indexes websites. Google explains how to ensure content is not indexed at:

    Remove URLs Tool - Search Console Help

    Thank you.
     
Loading...

Share This Page