I have a specific page that gives instructions to install/uninstall a software.

Depending on the type of device visiting, the instructions are different, the rest of the page being the same. The amount of variable text approximately is the same as the constant text.

How does this affect SEO? Are any tags to state this situation?

  • Can the different instructions be accessed by different URLs or is it only based on the user agent? – MrWhite Apr 29 '15 at 12:16
  • Only based on user agent. I've been thinking that having both sets of instructions in hidden divs simultaneously could be better (first idea was to generate different text in the server depending on the user agent but I can have both texts and un-hide one or the other with javascript) – Joan Apr 29 '15 at 13:37

If the page content is only based on the user agent and is not accessible by different URLs then the search engines are only ever going to see one version of the page and that is the version that will be indexed.

But this is also a problem for users. Users don't always search for help (or whatever "instruction" you are providing) using the device that they need help on. It is also impossible to bookmark (or share) one set of instructions over the other; there is no canonical URL for the different instructions.

Intermediary caches / proxy servers can also be a problem. Caches are usually indexed on the URL - which is deemed to be unique. If you have the same URL serving different content, an intermediary cache (place of work, ISP, etc.) could end up serving the same cached content to different user agents. In order to try and get around this issue you would need to send the Vary: User-Agent HTTP response header.

The best approach IMO is to have separate URLs/pages for each set of instructions and simply link between them. (You can't auto-redirect as you will have the same user/search engine problems as above.) Change the page title and description to reflect the instructions shown.

Using JavaScript to show/hide.

JS is a possibility, depending on implementation. All content would be shown initially and JavaScript then hides the one that is not relevant. Don't have them both hidden to begin with (as you appear to suggest in the comment above) since you want search engines to see all the content.

However, you still need the ability for the user to view the other instructions, for the reasons mentioned above. And you should still provide the ability to bookmark the different instructions by changing the URL (perhaps vary the fragment identifier).

| improve this answer | |
  • This is an important point: Users don't always search for help (or whatever "instruction" you are providing) using the device that they need help on. – closetnoc Apr 29 '15 at 14:13
  • I am especially concerned on negatively affecting SEO due to variable/hidden content. Not worried on having the specific instructions indexed as they are standard and non-relevant to the main keywords in the site/page. As for users, the main purpose is to present a clean page and the option to dig deeper if interested. Thanks! – Joan Apr 29 '15 at 22:31
  • Even the JavaScript route shouldn't result in a "penalty" if properly implemented since you are not trying to deceive users. However, you also don't want to serve different content to search engines as you do to users as this could be perceived as "cloaking", which is generally bad. If you are not concerned about having this content indexed then you could block these page(s) in robots.txt? However, users might still expect to be able to find that content again even if you aren't specifically promoting it. (I also added a bit about caching to my answer.) – MrWhite Apr 30 '15 at 0:16

It can actually give you a better position in seo, especially if you want to be listed in google, and your code detects a mobile device a display a properly-formatted page to that mobile device.

But the simple way to do this is in PHP. To start, create index.php containing these contents:

<!-- common header text/code goes here -->
if (strpos($user_agent,"opera") !== false){include "opera.htm";$set=1;}
if (strpos($user_agent,"ie") !== false){include "ie.htm";$set=1;}
if ($set!=1){echo "<p>unknown user agent: ".$user_agent." detected</p>";}
<!-- common footer text/code goes here -->

Then create opera.htm and ie.htm files and each of those files will contain instructions for opera browser and internet explorer browser (assuming ie is contained in the internet explorer user agent.)

for other browsers, add:

    if (strpos($user_agent,"_____") !== false){include "_____.htm";$set=1;}


    if ($set!=1){echo "<p>unknown user agent: ".$user_agent." detected</p>";}

and replace the underline with a string in lowercase that is part of the new user agent (browser) and create a file with the same name with the htm extension and write instructions in the htm file.

If you have access to .htaccess I could make an answer for it too.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.