cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Go to solution
New

How to redirect to show the mobile version of website instead of PC version?

I have created website on a different host but my domain names are bought from godaddy.

 

When I set redirect with masking of my godaddy domain to my website, It always shows the PC version of the website and not the mobile version.

Without redirect when I access my website from mobile it shows the mobile version of the website without any issues.

The website audience is mostly mobile based and the website looks really bad on mobile because it always shows the PC version. 

 

Is there any way I can set the redirect to show the mobile version of the website instead of the PC version?

 

Help would be much appreciated.

 

Thank you 

EDIT:

Spoke to godaddy chat agent and they said the issue is from host side. 

Spoke to the host and they said issue is being caused by using the masking option and there is nothing they can do unless I use their pro services to redirect website to my domain. 

 

Is there no alternative other than buying their pro package? 😐

1 ACCEPTED SOLUTION

You can use a .htaccess redirect to transfer visitors based upon the MIME types the browser supports. For example, if the user's browser accepts mime types that include WML (Wireless Markup Language), then most likely it is a mobile device.
The code below should be placed in your .htaccess file where m.domain.com would be substituted with your mobile website URL. I have seen php redirects, javascript redirects and about every other flavor of code for this. You could use CSS to build a responsive website with @Media query also. I am using the .htaccess file change and it seems to work for the most part. I also placed a link at the top of my PC version to the mobile version just in case it doesn't work.

RewriteEngine On
# Check for mime types commonly accepted by mobile devices
RewriteCond %{HTTP_ACCEPT} "text\/vnd\.wap\.wml|application\/vnd\.wap\.xhtml\+xml" [NC]
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^ http://m.domain.com%{REQUEST_URI} [R,L]

View solution in original post

6 REPLIES 6
Super User I

Doesn't your host offer you DNS name servers to point your domain to for your site on their platform?  I've never used masking to pull a fully developed site.  All masking does is forward and show your domain in the browser bar but the domain is not actually "on" the host where your site files are rendered which is what you need to do what you describe.

 

If your host doesn't offer domain servers for you to point to, time to find a new host.   If you are on a free host, well, you get what you pay for. Smiley Sad

 

 

 

 

Judith
"Broken crayons still color." Anon

I found a solution writing code on the index, is very well hidden. If you're still looking for an answer let me know, it's quite elaborate so I'll need to put instructions. LOL!

@oscarstein, I could really use the instructions! Redirected my link (purchased on GoDaddy) to my free Wordpress site, but it doesn't show the mobile website.

Please contact me on owais1999@gmail.com 

Thanks! 🙂

Owais

Could i get a smaple of that code as well?

You can use a .htaccess redirect to transfer visitors based upon the MIME types the browser supports. For example, if the user's browser accepts mime types that include WML (Wireless Markup Language), then most likely it is a mobile device.
The code below should be placed in your .htaccess file where m.domain.com would be substituted with your mobile website URL. I have seen php redirects, javascript redirects and about every other flavor of code for this. You could use CSS to build a responsive website with @Media query also. I am using the .htaccess file change and it seems to work for the most part. I also placed a link at the top of my PC version to the mobile version just in case it doesn't work.

RewriteEngine On
# Check for mime types commonly accepted by mobile devices
RewriteCond %{HTTP_ACCEPT} "text\/vnd\.wap\.wml|application\/vnd\.wap\.xhtml\+xml" [NC]
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^ http://m.domain.com%{REQUEST_URI} [R,L]

View solution in original post

Hi @oscarstein

I would love to have that code as well. I am trying to do the exact same thing!

 

Thanks a lot!