Category Archives: apple-touch-icon

Recognize "apple-touch-icon" with htaccess password protection

The question: How can I use a custom iPhone home screen icon while securing my website with .htaccess?

The setup:

  • PHP PaaS
  • Rudimentary password protection using .htaccess and .htpasswd
  • Simple website built using Wikitten

The problem: I would like to see my custom "apple-touch-icon" when I put a bookmark of my website onto my iPhone home screen using the "Add to Home Screen" function in mobile Safari. Unfortunately, when I enable "require valid-user" in the .htaccess file, the iPhone does not see the icon and instead uses a generic image. When I disable password protection in .htaccess, the icon is recognized, but I really need some sort of password protection and I hope to continue using the current method.

Any help is appreciated; thanks,