Mobile redirect to subdomain

nobaloney

NoBaloney Internet Svcs - In Memoriam †
What do you type into your browser on the browsers which don't work? Do you type m.woodlandbeachresort.com? And what do you get? Does it redirect to either www.woodlandbeachresort.com or woodlandbeachresort.com?

Jeff
 

KTyhcteks

Verified User
What do you type into your browser on the browsers which don't work? Do you type m.woodlandbeachresort.com? And what do you get? Does it redirect to either www.woodlandbeachresort.com or woodlandbeachresort.com?

Jeff
If you try www.woodlandbeachresort.com or woodlandbeachresort.com on a smartphone it will redirect to m.woodlandbeachresort.com.

If I type m.woodlandbeachresort.com on my smartphone or browser I get "Server not found."
 

nobaloney

NoBaloney Internet Svcs - In Memoriam †
I think I found the problem:
Code:
[jeff@office ~]$ dig m.woodlandbeachresort.com

; <<>> DiG 9.9.5-3ubuntu0.1-Ubuntu <<>> m.woodlandbeachresort.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 8156
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;m.woodlandbeachresort.com.     IN      A

;; ANSWER SECTION:
m.woodlandbeachresort.com. 21572 IN     CNAME   50.16.224.123.

;; AUTHORITY SECTION:
.                       1752    IN      SOA     a.root-servers.net. nstld.verisign-grs.com. 2015030701 1800 900 604800 86400

;; Query time: 29 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Sat Mar 07 13:25:16 PST 2015
;; MSG SIZE  rcvd: 153
Once again showing that dig is a much better diagnostic tool than is nslookup.

While NXDOMAIN is technically correct, by showing the IP# dig shows the problem.

CNAME records must never point to an IP#. They must point to a name, not an IP#.

http://support.dnsimple.com/articles/differences-between-a-cname-alias-url/

Possibly some programs work because they ignore the difference, but if you want it to work you must do it according to the RFCs :).

Jeff
 
Top