Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

m.subdomain - am I on the right track of understanding?

I have a question, but not sure if I understand it right, so here it goes.

For example, take google.com; If you browse to google.com on your smartphone it navigates to m.google.com. This I understand can be done by detecting device widths etc., but does that mean that Google re-wrote the page for mobile devices or can you treat the m.subdomain like a ghost type domain?

I mean, you can navigate to m.google.com but it really is just google.com with a different CSS or whatever - the index page is exactly the same.

I guess what I am getting at is - if I make a change in an index or any page in the main domain - will I need to update the subdomain separately if I decide to use a m.subdomain setup?

Hope it makes sense.

like image 749
jwknz Avatar asked Nov 27 '25 13:11

jwknz


1 Answers

There are two ways to solve this:

  • m.example.com is a new and separate website that needs updating whenever you update www.example.com
  • m.example.com is an alias of www.example.com. Your site at www.example.com needs to serve something different (e.g the CSS or even different template) whenever the http request is for m.example.com
like image 111
cherouvim Avatar answered Nov 30 '25 05:11

cherouvim



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!