Have you ever search your website in Google search and how it appears in Google SERP. When you upload an image file in WordPress it will create its own attachment page, just like a normal page.
Today I thought to find how many pages of my website are indexed in Google and I enter the Google Search query “site:technicalustad.com”
and I found it’s showing ” About 7870 results” but in reality, we don’t have that many pages on our website.
then I decided on check Google SERP for my website and enter my website URL in the google search and I found the result is really annoying because it’s showing my media attachments file in the google search result which is not good for SEO or nor for users.
Now it’s time to stop google indexing WordPress image attachment page.
Here is the best way to stop google indexing WordPress image attachment page
You can easily Disable media attachment pages with the “Yoast SEO” plugin which is one of the best SEO plugins and used by approx 70% WordPress websites.
Navigate to SEO > Search Appearance tab.
Click on the ” Media ” tab, By default ” Redirect attachment URLs to the attachment itself ? ” is selected ” No“, Just change this to “ Yes” and click on the Save changes.
Once Google will freshly index your website freshly it will deindex your media attachment files.
I will recommend you to read our guide on How To Submit URL To Google Search Engine For Fast Index.
If you are using All in One SEO Pack WordPress Plugin, navigate to the Noindex Settings page and check the Media option in “Default to NOINDEX ” and “Default to NOFOLLOW” and save the settings.
Here is the result after approx 22 days. There is no media attachment is visible here.
It’s really easy to stop google indexing WordPress image attachment page with Yoast or All in One SEO pack tool WordPress Plugin.