Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have a php 5.3/Apache 2.2 based cartoon website that always shows the most current cartoon on the homepage (index.php).

Now, a lot of people want to link directly to that cartoon (by copying the URL), so we added a little permanent link below the image (changing with the image id, like cartoon_1234.htm, cartoon_1235.htm and so on).

However, quite a few still link to index.php without realizing that that will show a different cartoon every day.

We considered using a simple header redirect - header('location: cartoon_xxxx.htm') - in our php code) that redirects whenever index.php is called, thus showing the desired URL in the browser.

But we are afraid the for instance the Google algorithm will not like the constantly changing temporary redirect (or will it?). And we don't want to risk our good ranking by showing different content to people and to SE-bots.

Question: is there any recommended practice to implement this kind of homepage with permalinked URL?

share|improve this question

migrated from stackoverflow.com Nov 9 '11 at 8:31

This question came from our site for professional and enthusiast programmers.

up vote 2 down vote accepted

There is one possible solution using the Javascript History API, which can change the URL in the address bar without redirecting or reloading the page. See the answer here for details:
Updating address bar with new URL without hash or reloading the page.

share|improve this answer
That's really cool. I'll evaluate that. Thanks. – Olaf Nov 9 '11 at 14:57

Question: is there any recommended practice to implement this kind of homepage with permalinked URL?

You should let the homepage be the homepage and you should not add redirects.

Each time a robot wants to index your homepage, there would be a redirect to some new page (at least one new page each day).

This is not helpful for your ranking.

Instead, educate the users so they know if they want to bookmark a specific cartoon, what they need to do.

Generally you've got a logical problem here: You can not divide one URL into two. One for the search engine robots and one for your users.

share|improve this answer
Thanks, quite convincing. Will educate. I just thought there might be something I overlooked. – Olaf Nov 9 '11 at 7:45
Sorry for unaccepting, but DisgruntledGoats answer looks promising. – Olaf Nov 9 '11 at 16:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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