Issues I have faced are when I go to the wp-admin to login I get redirected to new url since i am technically viewing the website with desktop browser. so I need to exclude all the admin/dashboard/all the pages that one uses to build a wordpress site.
[EXCLUSIVE] WordPress Mobile Redirect
Download
https://t.co/ibrZ42DaGB
I have a mobile site (
mobile.domain.com) and regular site (
domain.com) The permalinks will be the same for each site e.g.
domain.com/page-one/ and
mobile.domain.com/page-one/ so it seems like it should be fairly easy to redirect to the same page in the mobile site.
Everyone knows that a simple Javascript redirect will work great, but what if you want the user to end up on a page that has the exact same path name? If you have this redirect, then "
example.com/contact" will be redirected to "
mobile.example.com" - notice how this is not the mobile version of the contact page.
The solution is to have a Javascript snippet in the main header that will tell each page to keep its same pathname when redirected, such as "/contact". The one caveat is that each mobile page must be named the same as the desktop version - /whatever and /whatever.
I had initially attempted a responsive design for my website, but found certain elements weren't playing nice so ended up duplicating many with hide/show functions based on device (which was bogging down loading times). I wasn't happy with this, so scrapped the responsive design and instead made a mobile version of my site, with a single redirect on homepage for mobile users (from to -home).
While this mobile redirect method works great for myself and many other users, it's been brought to my attention by several people that they weren't getting redirected (so getting desktop version on mobile which looks all messed up).
I've tried a couple mobile redirect plugins now. They all work on my mobile device, but don't seem to work for everyone. Is there a recommended plugin that works more reliably? Or should I be using a script-based approach?
I cobbled together the following code from Pontus's answer and the answer to a slightly different problem here on WP Answers - This works alongside my mobile theme switching plugin, so when a mobile user visits the site, they are redirected to a new set of "mobile-friendly" pages and see my new responsive mobile theme, together with a collapsible mobile page menu :)
cnxsoft Were you using the default redirection method where JavaScript is used to do the redirection? In other words, were you using the amp_mobile_client_side_redirection filter to turn off client-side redirection to use server-side redirection instead? If so, one possibility could be that any caching layers were serving mobile results to desktop visitors.
The reason that your Sitelinks may be diminishing when you have Mobile Redirection enabled is that the AMP Legacy templates for Reader mode lack a nav menu. Perhaps this is why Sitelinks are not being discovered when you have mobile redirection enabled.
Excellent Wordpress plugin to detect mobile devices and redirect to the mobile site with Redirect count chart for different device. You can also choose whether or not to redirect tablets by enabling or disabling the check-box option. Also there are option for individual platform redirect like iPhone, Android, Windows Phone on WP Mobile Redirect Plus.
In order for Cloudflare's mobile redirection service to work, the domain must be hosted on the Cloudflare platform (both root and www). As an alternative, mobile redirection can be implemented with JavaScript or via plugins and/or modules for your site's framework.
You can detect user agents via JavaScript, then redirect requests to your configured and optimized mobile site. For cache considerations, we do not recommend using cookies that are passed to the backend for mobile theme detection and configuration. For details, see Caching: Advanced Topics.
Redirect scripts are installed in a desktop site and tells the site to automatically send customers visiting your site from a mobile phone to the mobile website instead of the desktop site. Mobile redirects are installed on your homepage, and every other page that you would like to redirect to the mobile version.
Depending on where your desktop site is hosted, redirect directions can vary slightly. However, the general steps of pasting the code after the tag are all the same. Here are the steps to install a mobile redirect on WordPress:
Keep in mind that any time a change is made to the HTML script of your site, it can take up to 24 hours to adjust. So do not panic if you cannot see your savvy new mobile site right away! If 24 hours comes and goes and your mobile site is still not visible, double check the placement of your redirect code and make sure all changes made in the template are saved.
When mobile redirection is enabled, AMP-to-AMP linking is automatically enabled. This ensures that navigating around the AMP version of the site will not result in the user constantly having to wait for a redirect from the non-AMP to the AMP version. To facilitate indicating which links should be rewritten to point to the AMP versions, an amp_to_amp_linking_element_excluded filter is added which allows opting out of AMP-to-AMP linking on a per-link basis; previously an array of all such link URLs had to be supplied via the amp_to_amp_excluded_urls filter. Any links which are excluded from AMP-to-AMP linking will automatically include ?noamp=mobile added to them to prevent any possible undesirable redirection to the AMP version.
We recommend MalCare, because we have seen many variants of the WordPress website hacked redirect malware. A very common one is when your website is accessed on a mobile device, which points to the malware being in the .htaccess file. Or one we commonly see is the hack on pages, which redirects automatically. This happens when the database has the malware.
The Genesis Mobile Redirect plugin allows you to select a page or a custom URL, which you can set as homepage for mobile devices. You set the redirect either for smartphone or for smartphone and tablet. You can also set your custom max width if you want to show the mobile homepage for example on smartphones in combination with iPad mini.
Cloudflare install in the server-side because of that reason it works on the high property and it does not allow mobile redirection and it will server the desktop version only. So please keep in mind that if you want mobile redirection then you need to disable Cloudflare and you cannot have both Cloudflare caching and mobile redirection at a time.
When I am clicking on the posts in AMP version no texts appears, It shows blank page. Why the content of the post is not showing in AMP version? And after opting the mobile redirection option, site is not automatically redirected to the amp version. Please solve this.
Websites are made for both mobile and desktop. Many customers visit your website from their mobile devices. With this plugin, you can detect mobile devices and redirect this traffic to the mobile version of your website for fast and easy access to your content and products.
The plugin comes with many redirection options. It has a redirect chart for different devices. For example, you can redirect to a specific mobile platform: iPad, iPhone, Android, or Windows Phone. Each platform can be assigned a different mobile URL option.
One thing: Once a mobile user logs onto the site it takes them to the mobile site. I want to let them be able to go to the full-version site. But of course when they click on the link, it redirects them to the mobile site.
I have not seen it acting glitchy. The code you are talking about should be placed on the mobile index page. That is the PHP code that will set the cookie to override the mobile redirect when you try to view your full site.
I would think that this JS would go in the head, before any full-site CSS and content, therefore redirecting before loading unnecessary files. That can be slow on mobile and take up valuable KB transfer.
both websites have a same urls for example if you will open desktop version (
www.desktop.com/albums/taylor-swift.html) and a same url on mobile version (
www.domainname.mobi/albums/taylor-swift.html). but the problem is i have all my website static and its very old website i have more then 10k static pages. will i go every page and add the code ? is there any solution to add some .htaccess codes and it works and redirect same to same but change .com to .mobi
For WordPress "Simple Mobile URL Redirect, WordPress Mobile Pack
For Joomla " Simple Mobile Detection
For Magento " URL Redirects
For Drupal " Simple Mobile Redirect,Mobile JS Redirect
If your website is created in any other CMS, try a Google search for a plugin that helps with mobile redirects for that particular CMS.
If your site is coded in PHP you can use this method to redirect your mobile users. The advantage of using this method is that you are not limited to browsers that run on JavaScript. However, you will have to list multiple user-agents.
Another alternative method of redirecting the mobile user on to your mobile website, based on the MIME type the browser supports, is the .htaccess method. So for instance, if the browser type supports the MIME type that includes WML (Wireless Markup Language), the browser is from a mobile device.
Thus there are many ways to redirect mobile users to your mobile site, as listed above. You can place multiple scripts on your website's head section, say for example the script that detects the screen size as well as the user agents.
But your job is not done until you have your mobile redirects working well for search engine bots as well. Especially, in the case of Google, there are some configurations that you need to do so that they differentiate between the desktop URL and mobile URL.
Once you have placed proper redirects on your site for your mobile users, it is time to test whether the redirects work well for different devices. Testing it manually on any available smartphone device is one way of going about it. But you can also use these mobile emulators to test the correct rendering of your mobile site on different mobile devices.
0aad45d008