How to Create a CNAME record for the subdomain and point it to your main domain

Hi, im stuck with this problem for 3 days, i create a subdomain api.figurine.ml and want it to point it to my main domain which is figurine.ml, i create a cname record but it seems that dont work

Maybe im doing something wrong, i would really appreciate your help, thanks.

Imgur

@Jvaldez said:
Hi, im stuck with this problem for 3 days, i create a subdomain api.figurine.ml and want it to point it to my main domain which is figurine.ml, i create a cname record but it seems that dont work

Maybe im doing something wrong, i would really appreciate your help, thanks.

If you want it to just redirect to your website, you could do this by creating a 301 redirect in .htaccess file located on your website folder/htdocs
Redirect 301 / http://www.newdomain.com/
Maybe it is because of DNS Propagation, but I am not sure if creating a CNAME record would work.

If you want to add a subdomain to your website here, you need to use the Subdomains section. The Subdomains section sets up the DNS records, but also configured the web server to make sure your domain name is actually handled.

Pointing a domain name to the IP address your hosting account is on is not enough to register it with the server and make it serve your website.

@Admin said:
If you want to add a subdomain to your website here, you need to use the Subdomains section. The Subdomains section sets up the DNS records, but also configured the web server to make sure your domain name is actually handled.

Pointing a domain name to the IP address your hosting account is on is not enough to register it with the server and make it serve your website.

As I understood so far, he wants to create a subdomain (sub.me.ga) which points to his main domain (me.ga).
All domains I mentioned are just examples.

@Admin said:
If you want to add a subdomain to your website here, you need to use the Subdomains section. The Subdomains section sets up the DNS records, but also configured the web server to make sure your domain name is actually handled.

Pointing a domain name to the IP address your hosting account is on is not enough to register it with the server and make it serve your website.

Hi, thanks for your answer, i already create a subdomain (see capture please)

im only want to point that subdomain (api.figurine.ml) to my main domain (figurine.ml), i already tried creating a cname record but it seems that dont work
Imgur

Maybe im doing something wrong…

@Jvaldez
Does the htaccess method not benefit you?

@ChrisPAR said:
@Jvaldez
Does the htaccess method not benefit you?

no because, im trying to show a different view of my project in the subdomain

that’s why I need to point the sub to the main

@Jvaldez said:

@Admin said:
If you want to add a subdomain to your website here, you need to use the Subdomains section. The Subdomains section sets up the DNS records, but also configured the web server to make sure your domain name is actually handled.

Pointing a domain name to the IP address your hosting account is on is not enough to register it with the server and make it serve your website.

Hi, thanks for your answer, i already create a subdomain (see capture please)
Imgur: The magic of the Internet

im only want to point that subdomain (api.figurine.ml) to my main domain (figurine.ml), i already tried creating a cname record but it seems that dont work
Imgur: The magic of the Internet

Maybe im doing something wrong…

You’re not doing anything wrong. But what you’re asking for is not possible on free hosting. Subdomains and addon domains get assigned directories automatically, and it’s not possible to change the directory of domain to match another website. The only way to do that is with parked domains, but you cannot use that function for subdomains.

On premium hosting you do get full control over the document root for all domains and subdomains on your account.

@Jvaldez said:
that’s why I need to point the sub to the main
Here on InfinityFree domains get their own root. So, there’s no escaping it.
When you create the sub domain you need to go under your domain’s DNS and set an A Record to point to your root site’s IP Address. Inside the folder you can handle anything you want. But, you can’t load non-existing information (a root (the web root ‘www’) of another domain (your default)) you’ll need to integrate it from one to the other so they both conjoin because essentially a sub domain is a separate website.

@Friendifie-Inc said:

@Jvaldez said:
that’s why I need to point the sub to the main
Here on InfinityFree domains get their own root. So, there’s no escaping it.
When you create the sub domain you need to go under your domain’s DNS and set an A Record to point to your root site’s IP Address. Inside the folder you can handle anything you want. But, you can’t load non-existing information (a root (the web root ‘www’) of another domain (your default)) you’ll need to integrate it from one to the other so they both conjoin because essentially a sub domain is a separate website.

You can’t set A record here on InfinityFree BTW.
You can but you’ll have to use external DNS management like Cloudflare (Not the cpanel integration).

@UnknownLolz said:
You can’t set A record here on InfinityFree BTW.
You can but you’ll have to use external DNS management like Cloudflare (Not the cpanel integration).
I’ve never said you can set an A Record under Infinity free, my friend.
I trust Cloudflare with all of that. What I was talking about the “integrating” would be from one domain web root htdocs from the root to the other domain web root htdocs because they’re as stated above “Inside the folder you can handle anything you want. But, you can’t load non-existing information (a root (the web root ‘www’) of another domain (your default)) you’ll need to integrate it from one to the other so they both conjoin because essentially a sub domain is a separate website.” two separate web roots under the master root.

@Friendifie-Inc said:

@UnknownLolz said:
You can’t set A record here on InfinityFree BTW.
You can but you’ll have to use external DNS management like Cloudflare (Not the cpanel integration).
I’ve never said you can set an A Record under Infinity free, my friend.
I trust Cloudflare with all of that. What I was talking about the “integrating” would be from one domain web root htdocs from the root to the other domain web root htdocs because they’re as stated above “Inside the folder you can handle anything you want. But, you can’t load non-existing information (a root (the web root ‘www’) of another domain (your default)) you’ll need to integrate it from one to the other so they both conjoin because essentially a sub domain is a separate website.” two separate web roots under the master root.

I was assuring to @Jvaldez that you can’t add A Record here, so that he will not ask anymore about this kind of question my friend :slight_smile:

@UnknownLolz said:
I was assuring to @Jvaldez that you can’t add A Record here, so that he will not ask anymore about this kind of question my friend :slight_smile:
Great idea! :smile: