add ftp server to a subdomain
Solution 1
Create a Host A
record in DNS manager with name ftp
to your IP of FTP server. OR
Assign a CNAME to www.domain.com
with name ftp
I hope this video might be helpful: https://www.youtube.com/watch?v=qqABLv7XK34
Solution 2
You will need to change your domain dns settings to point ftp.domain.com to your server's IP address. If you have Apache running, you could use virtual hosts to make sure that ftp.domain.com does not point to your website.
<VirtualHost *:80>
DocumentRoot /var/www/
ServerName domain.com
ServerAlias www.domain.com
</VirtualHost>
If you configure nothing else, only your website would be accessible under domain.com or www.domain.com. Your FTP site would be accessible under domain.com, www.domain.com and ftp.domain.com unless you did something similar.
Related videos on Youtube
Tom
Updated on September 18, 2022Comments
-
Tom over 1 year
I'm currently running an ftp server (vsftpd) on my site say www.domain.com. I'd like to change this so users can type in ftp.domain.com instead of www.domain.com to get to my ftp.
I'm confused with the process here. I'm using Godaddy for my domains. I assume I have to create a subdomain. Although it sounds like I may need to just forward my domain to this subdomain. But wouldn't that generate duplicate content in Google's eyes?
What is the process I need to do to set this up? Thanks in advance.
-
moritzebeling about 11 yearsAssuming you manage your hosting from cPanel, what you can do is create subdomain "ftp" and use it as prefix to domain.com so users can type ftp.domain.com You can also shorten URLs if you find them to be longer than desired. Is content on your domain.com already indexed in Google? If you redirect 301 to subdomain, then Google will probably eventually remove domain.com from its index and add the destination but I don't see why you need to go this route. Just create subdomain.
-
Tom about 11 years@Boris_yo My site is already indexed. I'm just worried about creating subdomain ftp when it will just point to www.domain.com. Won't Google think I have 2 duplicate sites at ftp.domain.com and www.domain.com?
-
moritzebeling about 11 yearsIs content on ftp.domain.com same as on domain.com?
-
moritzebeling about 11 yearsYou can't run website on FTP because it is not HTTP. All your browser will see is a list of files and directories. If you want to host FTP server (not website) on ftp.domain.com then content on your HTTP which is www.domain.com will be completely different to that of on FTP.
-
Tom about 11 years@Boris_yo Thanks. This is simple then. I just need to add ftp subdomain. Feel free to add answer so I can accept.
-
moritzebeling about 11 yearsThe answer that grvpanchal gave you is technically more extensive and looks interesting to try. Since my domain registrar is not GoDaddy I will need to look if same can be done there too. Feel free to accept his answer.
-
-
Tom about 11 yearsWould this be necessary if I just got a subdomain?
-
Ethan Allen over 7 yearsDon't you mean add a
CNAME to domain.com
forftp
? You should also have aCNAME to domain.com
forwww
, which then points to theA
record of@
, your base domain name.