3

Let's say I wanted to make a website or series of pages where the title (or at least what appears on your browser's tab) alternates randomly each time it's loaded - just for giggles. I have a bank of random messages, for example:

(1) Donald Trump's spicy meme farm.

(2) Are you feeling it now Mr. Krabs?

(3) Put some respeck on the name.

Is there any way I can spoof a page's title during "real" browsing sessions without overwriting the actual title that a crawler would use for SEO?

I have tried JavaScript, since I assume most bots aren't going to support it. (Or has Google started doing that now?)

I've been loading a new message into an array and outputting it like so -

document.title = "This is the new page title.";

It seems to do what I want it to, but I have no idea what the ramifications will be as I go.

My inspiration was the question How to dynamically change a web page's title? and basically I'm trying to figure out if the top answer will hold true long-term and I won't be shooting myself in the foot if I launched a site like that.

  • 2
    So you want to show search engines one thing and show users another? You do realize that's how you get banned, right? And annoys users? So, basically, a bad idea. – John Conde Jun 23 '16 at 1:09
  • Whether or not it's a bad idea has no bearing on whether or not it's feasible. – TRose Jun 23 '16 at 1:58
  • Correct...if the question was purely academic. I am sure it's not. – John Conde Jun 23 '16 at 12:01
  • 1
    Since you can identify crawlers serverside, you could just not serve the javascript code that changes your title. – Jurik Jun 23 '16 at 13:03
  • You do know that Google checks websites from outside of it's own network specifically to check for cloaking? Just wanted to let you know. – closetnoc Jun 23 '16 at 15:20
3

Yes, Google has started supporting javascript in their bots, this is due to the increasing popularity of javascript in the web and frameworks like Angularjs.

Taking the bigger picture, the web isn't just about urls, it is about content and user experience, every day they improve their algorithm to make it better with these goals in mind, so one hack that could work today to trick bots would be detected in the future and your site is gone.

If the content of your webpage differs from what the user sees, they will detect it, the user experience will be awful and your website will be very low in SERPs.

  • Fair enough. Balanced answer. I would never actually do this in practice but it was an interesting idea to me. – TRose Jun 23 '16 at 20:55

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.