CNAME to subdirectory?


#1

I understand that a CNAME refers to a DNS record, so I can’t refer david.piechnik.ca to piechnik.ca/david

Is there another command or referrer I can use to have an alias like that on my domain?

Thanks for the help!


#2

If these are both hosted here, you can Edit your Fully Hosted Domain (david.piechnik.ca) to use /home/USER/piechnik.ca/david as its directory. I think. I’ve not tried this, but I don’t see why it wouldn’t work. You may have issues with links if they’re not carefully planned (use relative links within david, and full-path links to get to piechnik.ca).


#3

Sorry, I don’t think I understand (which is why I posted in beginner forum! :P). I have piechnik.ca fully hosted. I want piechnik.ca to just be standard. I want david.piechnik.ca to refer to piechnik.ca/david

Is this possible?


#4

Go ahead and start creating a Fully Hosted david.piechnik.ca and make sure it’s the same FTP user as piechnik.ca. For the space where it says “Web directory /home/username/” it will pre-fill david.piechnik.ca.

Change it so it’s piechnik.ca/david


#5

Thank you! It was so much simpler than I thought…just didn’t know I could do that. Thank you very much!


#6

If you still want to have david.piechnik.ca redirect to piechnik.ca/david/, you can do the following:

On the Full Hosted settings page for david.piechnik.ca, scroll down to the Redirect section. Enter a redirect URL:

Redirect to URL: http://piechnik.ca/david/

And click the “Redirect this domain” button.

Now david.piechnik.ca is redirected to piechnik.ca. The redirection is marked a “permanent”, which means that search-engine’s (Google, etc) will use the redirected URL as the official URL.