• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

How to redirect attachment URLs to post URL ?

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › How to redirect attachment URLs to post URL ?

This topic is: not resolved

Tagged: attachments, media, parent post, urls, yoast

  • This topic has 4 replies, 2 voices, and was last updated 12 years, 1 month ago by MM.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • May 31, 2013 at 11:40 am #43391
    MM
    Member

    Hi

    I want to make sure when a user accesses images via Google:

    http://mikemetcalfe.co/wp-content/uploads/Mike-Metcalfe-Blog-Conferences-Destinations-Host-Hotels-MICE-Tourism1.jpg

    That they are automatically and force redirected to parent posts:

    http://mikemetcalfe.co/conference-center-hotel-event-site-selection-factor-influences/

    I'm using Yoast and have 'redirect attachment URLs to parent post URLs' but that's not working.

    Any ideas? Thks!

    June 2, 2013 at 1:09 am #43582
    Brad Dalton
    Participant

    Try this:

    Code not displaying? Grab it from Github.


    Tutorials for StudioPress Themes.

    June 2, 2013 at 2:34 pm #43652
    MM
    Member

    Hi Brad, strange. Doesn't seem to work. Thanks regardless.

    June 2, 2013 at 8:36 pm #43743
    Brad Dalton
    Participant

    There's also a link in that code to 4 other ways to redirect image attachment url's to the post.


    Tutorials for StudioPress Themes.

    June 3, 2013 at 12:28 am #43768
    MM
    Member

    Thks Brad.

    Tried these options. Regardless, the below image File URLs are still accessible (i.e. in Google Image Search by clicking 'View Original Image'.

    http://mikemetcalfe.co/wp-content/uploads/Mike-Metcalfe-Blog-Conferences-Destinations-Host-Hotels-MICE-Tourism1.jpg

    Have had Yoast activated a long time, yet that hasn't work either. Can't see any plugin conflicts. Any idea why the above URLs are still displayed?

    Cheers

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble