Hey everyone,

I'm posting this thread in this forum because I am not sure where else it should go to. Anyway, I'd like to straight jump to the question. I want to make the URL to my site look like mob.mysite.com. how do you achieve something like this? do I change the URL in the app depending on the device a user is using to access my website?

cheers

Dani AI

Generated

As pointed out, mob.mysite.com is a hostname separate from the main site. To make that usable in production there are three pieces to consider: DNS, server configuration, and the UX/SEO approach.

Create an appropriate DNS record (A or CNAME) for the hostname and configure the web server or hosting control panel to handle requests for that host. Decide whether the mobile host will serve the same app responsively, serve different markup (dynamic serving), or host a distinct mobile site. Each approach has trade-offs: responsive is simplest to maintain; dynamic serving requires a Vary: User-Agent header to inform caches; separate URLs need explicit handling for redirects and search engines.

If choosing a separate mobile hostname, follow SEO and usability best practices: use proper HTTP redirects (301 for permanent), include a visible “view full site” option so visitors can override automatic routing, and annotate the relationship between desktop and mobile pages to avoid duplicate-content issues (desktop pages should point to the mobile variant as alternate; mobile pages should point back to the desktop as canonical). Consolidate analytics so metrics are not split across hosts.

Operational notes and gotchas: HTTPS is required for modern browsers — a wildcard or SAN certificate will simplify subdomain coverage (wildcard certs typically require DNS validation). To share sessions across subdomains set the cookie domain to the base domain (for example, .mysite.com) and use Secure/SameSite settings. Allow DNS TTL propagation when testing, check server logs and real devices (not just emulators), and avoid brittle user-agent sniffing where possible.

Because asked about hosting: if the control panel is limited, contact the host for DNS/vhost support. For new projects, responsive design is usually the easiest and most future-proof option.

Recommended Answers

All 3 Replies

mob.mysite.com

Has nothing to do with apps or mobile devices, it's what's known as a Subdomain and can be called anything. They are created using the control panel of your website and will route all traffic to the sub-domains URL directly down to a folder inside your main sites public_html so..

dishwasher.mysite.com
Would be a shorter way of saying mysite.com/kitchen/dishwasher/

People do it to make the URLs easy to remember or just more pretty

what hosting provider are you hosting your site with?

.. Awesome answer. I was only wondering about that. I think that answers my query. Cheers!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.