• So I started getting some 404s on my site for files in the root like “/apple-touch-icon-152×152.png” and other similar filenames. I did some Googling and found that this is to do with Apple devices looking for images to use as “App” icons if someone chooses to save the website to their phone as a quick link.

    So I knocked up all of the necessary image files of various sizes and uploaded them to the root of my site (the public_html directory, alongside .htaccess and wp-load.php etc.).

    However, I still cannot hit these images through my browser (i.e. http://www.[mydomain].com/apple-touch-icon-152×152.png), so I believe these 404s will continue. I checked that the permissions were set appropriately on these files (644), but still I cannot access them through my browser.

    How can I further troubleshoot this? Is it likely to be something to do with my installed theme, or the fact I’m using WordPress at all? Or do I also have to put something in my <head> to make this work? Any help greatly appreciated!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator James Huff

    (@macmanx)

    You might want to be sure the files were placed in the right directory.

    Or, have WordPress take care of all that for you. To do that, delete the files, then visit Appearance > Customize in your site’s Dashboard, and upload a logo in the Site Identity section: https://codex.wordpress.org/Creating_a_Favicon#WordPress_Version_4.3_or_later

    From that single upload, WordPress will take care of generating and serving all of the necessary images automatically.

    Thread Starter x3n1gm4x

    (@x3n1gm4x)

    Hi @macmanx, thanks for replying.

    My understanding was that the root of the website (i.e. the public_html folder on my website which contains my .htaccess file and wp-load.php etc) was the right directory? If not, can you tell what what the right directory is, or how I can establish this for myself on my site/hosting?

    I had already created a Site Icon (favicon) as per the instructions in your provided link, but still get these 404s, so that is not the solution I’m afraid.

    Moderator James Huff

    (@macmanx)

    Yes, that should be the right directory then.

    What is the URL of the site with the problem?

    Thread Starter x3n1gm4x

    (@x3n1gm4x)

    Moderator James Huff

    (@macmanx)

    So, WordPress has properly set the icons:

    <link rel="icon" href="http://disneyindetail.com/wp-content/uploads/2017/10/cropped-SpaceshipEarthWithShadesFavicon-32x32.png" sizes="32x32" />
    <link rel="icon" href="http://disneyindetail.com/wp-content/uploads/2017/10/cropped-SpaceshipEarthWithShadesFavicon-192x192.png" sizes="192x192" />
    <link rel="apple-touch-icon-precomposed" href="http://disneyindetail.com/wp-content/uploads/2017/10/cropped-SpaceshipEarthWithShadesFavicon-180x180.png" />
    <meta name="msapplication-TileImage" content="http://disneyindetail.com/wp-content/uploads/2017/10/cropped-SpaceshipEarthWithShadesFavicon-270x270.png" />

    And, specifically the size and meta tag for the Apple Touch image is set according to Apple’s specs as of iOS 10, so that makes me wonder what’s pulling up a 404 on apple-touch-icon-152×152.png

    How often are you seeing that 404? For what it’s worth, all of my sites bear the same meta tags and don’t get any 404s for Apple Touch images.

    Thread Starter x3n1gm4x

    (@x3n1gm4x)

    I’ve only had a couple, both yesterday:

    /apple-touch-icon-152×152.png
    /apple-touch-icon-152×152-precomposed.png
    /apple-touch-icon-120×120.png
    /apple-touch-icon-120×120-precomposed.png

    The site doesn’t have loads of traffic right now (only launched this week and had a few hundred visitors and a couple tousand page views so far), but I just wanted to nip it in the bud if there was a problem…

    Moderator James Huff

    (@macmanx)

    Ok, so in that case I suspect it’s either a very old version of iOS (the current version is 11.0.3), or just a badly coded bot.

    Probably not something to worry about too much in the grand scheme of things.

    Your Apple Touch image works just fine for me: https://d.pr/i/QZ2ydy/2auQ7ZuY

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Problems solving 404 issue with apple-touch images’ is closed to new replies.