: Is having multiple index files for various devices bad SEO? I have two html files, one for mobile and the other file for the other devices. I am detecting mobile devices by using PHP a if
I have two html files, one for mobile and the other file for the other devices. I am detecting mobile devices by using PHP a if ($modile) and this is followed by an include("example.html"> to determine which index is to be viewed.
Here's an example of my code:
<?php
if($modile) include("index_m.html");
else include("index.html");
?>
Each indexes are slightly different than one and another, and look like this in the address bar:
www.example.com/index.html http://www.example.com/index_m.html
Question:
Since my site is using two index files, will search engines consider this bad SEO?
More posts by @Merenda212
1 Comments
Sorted by latest first Latest Oldest Best
While exposed index files isn't a URL-friendly approach, your idea of redirecting to a specific index file based on what the client's device is actually a fabulous start because then search engines (especially google) can understand that you have a desktop and mobile version of your page and google will try to display the most relevant page to the client based on his/her device.
As an added bonus, your idea will score well when you run it through Google's page-speed insights since it likes to check your page for mobile device compatibility as well. I believe google webmaster tools (search console) has a section where it would complain if your page is not mobile friendly.
Google has an article on how you can add code to make your separate URLs more helpful to google when it comes time for it to index them.
developers.google.com/webmasters/mobile-sites/mobile-seo/separate-urls
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.