Because of domain provider limit, I cannot customize some URL redirection, then how to use URL redirect without DNS cname redirection support? It’s easy, for example, in this website, there is a fast url to redirect my customized admin address. Assumpt the fast path is “/cname”, then I will add following little changes to support CNAME like function in DNS.
1. Add new directory “cname” in my website root path.
2. Add one new “index.php”(default page file) into “cname”.
<?php header("Location: /where-is-my-admin-path"); ?>
Then, it’s OK!
PS, what is CNAME?
A CNAME record or Canonical Name record is a type of resource record in the Domain Name System (DNS) that specifies that the domain name is an alias of another, canonical domain name.
Usage of CNAME-records
Using CNAMEs makes your DNS data easier to manage. CNAME-records point back to an A record. So if you change the IP address of the A record, all your CNAME records pointed to that record automatically follow the new IP of the A record. The alternative solution is to have multiple A records, but then you would have multiple places to change the IP address which increases the chances of error.
The most popular use of the CNAME-record, is to provide access to a web server using both the standard www.domain.com and domain.com (without the www). This is usually done by adding a CNAME-record for the www name pointing to the short name [while creating an A Record for the short name (without www)].
You have a website with the domain name mywebsite.nl. This domain name is hooked up to an A-record which translates the domain name to the appropriate IP address, f.i. 184.108.40.2064.
You also have several subdomains, like www.mywebsite.nl, ftp.mywebsite.nl, mail.mywebsite.nl etc. and you want this sub domains to point to your main domain name mywebsite.nl. In stead of creating A-records for each sub domain and binding it to the IP address of your domain, you create an alias, a CNAME-record. See the table below, in case your IP address changes, you only have to edit 1 A-record and all subdomains follow automatically because de CNAMES point to the main domain with the A-record.
(Sub)domain Type Target mywebsite.nl A 220.127.116.114 www.mywebsite.nl CNAME mywebsite.nl ftp.mywebsite.nl CNAME mywebsite.nl mail.mywebsite.nl CNAME mywebsite.nl