這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Smart Attachment Page Remove

外掛說明

The Smart Attachment Page Remove Plugin allows you to remove Attachment Pages automatically generated by WordPress

Retired Plugin

Development, maintenance and support of this plugin has been retired in october 2023. You can use this plugin as long as is works for you.

There will be no more updates and I won’t answer any support questions. Thanks for your understanding.

Feel free to fork this plugin.

Usage

WordPress automatically generates a page for every file you upload to your Media Library. Even if you do not want to use these Pages and never link media files to their Attachment Page these pages exist and can be accessed by their automated generated URL. The Smart Attachment Page Remove Plugin blocks access to Attachment Pages and causes an 404 error (“page not found”).

This ensures that Attachment Pages do not appear in the results of Search Engines unwanted.

Additionally this plugin prevents from comment spam sent via this Attachment Pages because they are no longer accessible.

Settings

Optionally, a status code 410 can be sent instead of status code 404.

HTTP status code 404 indicates that the requested URL could not be found. This is the default code always sent by WordPress when a URL can not be found. HTTP status 404 does not provide any further information why a URL was not found.

HTTP status code 410 on the other hand indicates that the requested URL is no longer available and will not be available again. If your Attachment Pages already have been indexed by search engines, HTTP status 410 informs them to immediately delete those pages from their index. This should speed up removal.

Regardless, in case of Attachment Pages it makes more sense to use HTTP status 410 anyway and it is recommendet to activate this option in any case.

This option is not activated by default only because it is not the usual behavior of WordPress. There are no negative effects in using HTTP 410.

Plugin Privacy Information

  • This plugin does not set cookies
  • This plugin does not collect or store any data
  • This plugin does not send any data to external servers

使用者評論

2023 年 10 月 28 日 1 則留言
<!– wp:paragraph –> <p class=””>It returned a 404 error code just like I wanted so that googlebot does not see a single attachment page.I am convinced that from a SEO point of view, this plugin can be VITAL.</p> <!– /wp:paragraph –> <!– wp:paragraph –> <p class=””>Previously, Googlebot spotted all attachment pages and spent time crawling them even if there were redirecting to parent pages by my SEO plugin Rank math seo & Yoast.</p> <!– /wp:paragraph –> <!– wp:paragraph –> <p class=””>By default Yoast or Rank math seo redirect attachment pages to parent pages. Sometimes it redirects attachment pages to the image url itself.</p> <!– /wp:paragraph –> <!– wp:paragraph –> <p class=””>However, Nothing on my website had links to an attachment page. btw, I suspect that in the past a XML sitemap listed these attachment URLs so that googlebot spotted them.Anyways, I think it is a really bad idea to redirect them. The attachment page is not an equivalent of its parent page. I am sure it can trigger a Google’s Cloaking penalty.</p> <!– /wp:paragraph –> <!– wp:paragraph –> <p class=””>All SEO plugins got it wrong from this point of view. They should create a 404 when webmasters want attachment pages to be disabled.So for sure, i could have installed Yoast and activate it but opt for the option to hide it in search appearances. It would have added a noindex.This means that in this case, the pages would have been still there. This means that Googlebot would likely spend time crawling these useless pages. I have more than 100 of them.That’s why this plugin is so important. It returns a proper 404 which will send the best possible signal to Googlebot.</p> <!– /wp:paragraph –> <!– wp:paragraph –> <p class=””>I also don’t trust SEO plugins. In the past, Yoast changed the settings of attachment pages during an update (Yoast 7.0). I don’t know if you heard of it but millions of attachment pages have been indexed because of this update. Since that time, I don’t trust SEO plugins anymore.</p> <!– /wp:paragraph –> <!– wp:paragraph –> <p class=””>In the past, I had this issue, I redirected attachment pages and my website was penalized by google. By returning a 404 , I avoid any Google penalty. That’s why this plugin is vital.</p> <!– /wp:paragraph –>
2021 年 4 月 8 日 1 則留言
Works as expected, but settings page with custom styles is redundant, imo.
2020 年 11 月 14 日 1 則留言
What else is to say? It just works.
閱讀全部 13 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Smart Attachment Page Remove〉的開發相關工作。

參與者

〈Smart Attachment Page Remove〉外掛目前已有 1 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將〈Smart Attachment Page Remove〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

4.0.5 (2024-04-17) URGENT BUGFIX

  • Bugfix after Cleanup

4.0.4 (2024-04-16) CLEANUP

  • Cleanup

4.0.3 (2022-10-03) FINAL VERSION

  • removed all links to webiste
  • removed request for rating

4.0.2 (2022-05-29)

  • just cosmetics
  • Plugin Foundation updated to PPF08
  • removed unneeded leftovers from pre 4.0.0

4.0.1 (2020-08-25)

  • uninstall fix

4.0.0 (2020-08-23)

  • now uses my own Plugin Foundation
  • new UI

3 (2019-01-04)

  • option to send HTTP status 410 instead of HTTP status 404
  • code improvement
  • UI improvements

2 (2018-04-17)

  • minor code- & UI-improvements

1.2 (2017-11-16)

  • faulty display in WP 4.9 fixed

1.1 (2017-06-26)

  • redesigned admin interface
  • code improvement

1.0 (2017-01-12)

  • Initial Release