How to properly connect the subdomain?

I’m still fixing the tv problem, but there’s a new one.
I configure mobile version of the site (expected result - *m.*site. com)

and i also create .com in cpanel subdomain creator.
But m. subdomain is empty(only have cgi-bin(also empty))
Tell me please, how to correctly add a subdomain

1 Like

I am not sure, but subdomain means entirely different installation to me, rather than just the mobile version of one site

are you using an extra to route users to your mobile site? is your site responsive (built with bootstrap or related)? Its generally not a different domain, I believe…I did one once but remember little about it

let’s wait for better feedback than mine, others will guide you

There are 2 versions of the site - mobile and desktop (each is divided into 2 versions with different languages)

I need to display the same content (product characteristics) in both.
I just need to users coming from mobile phones get mobile version of the site, and those coming from PCs get desktop version of the site

1 Like

I have already created 2 resources \ templates with their code.

1 Like

Yeah its just a new template which is really simple. With bootstrap it can be natural, but you can certainly build a mobile site

Check out these options:

As I remember, if chunks of code are displayed depending on the version of the site, there will be an additional load on the server

1 Like

Or do the contexts have the same load?

1 Like

chunks themselves are not a big problem, because they are only bits of html or some other code

bashing the server is like huge tvs, or requests in other ways

i would say no distinction, deliver this page or that, this context or that

Thx, I’ll consider your variant, but I’m still more interested in splitting the site into “ .com” and “site .com” =(

1 Like

Its the same, no difference there. Yes, it appears as a subdomain but in my view, from the backend its just another template.

Sorry I can’t give you clear info, others will be along soon and you will be right :slight_smile:

I have to agree with @nuan88 on the mobile site comment. Unless the mobile version of your website is running something similar to AMP, this is probably not the best route to take.

Back on topic: I suppose the best way to think through this issue is essentially hosting multiple sites in one instance of MODX, right? You want one folder for the desktop site, another for the mobile, each with their own domain; or in this case, one with a sub-domain.

All that said, I don’t think you will need another install of MODX. Take a peek here once.

One major part that you might be missing is the manipulation of the htaccess file - maybe the mapping of the domains too.

Are you referring to users load time maybe? If so, this is technically true. Loading a website made for all devices onto a phone via something like Bootstrap would slow down the user. They would be loading extra crap they don’t technically need. Again, if you planned on having a stripped-down version of your site for mobile (like AMP), this could be a significant difference in loading time for the user. But, providing a wholesome experience (similar to the desktop) for users on a separate stripped-down mobile site is very difficult. And think, people’s phones and internet connections are getting faster every day!

Maybe the next project :wink:

–When you have some free time, I would play around with Bootstrap, it’s a lot of fun to just throw CSS classes everywhere!! It can be intimidating. Let me know if you have any questions. :sunglasses:

1 Like