Redirect wp-admin to the Homepage for Logged-Out Visitors
Sends logged-out visitors who open /wp-admin/ to the homepage instead of the login page, so bots probing wp-admin do not learn where to log in.
Snippet Library
3,040 free snippets from the WPIDE team and the community. Copy the code, or add any snippet to your site in one click with WPIDE.
Sends logged-out visitors who open /wp-admin/ to the homepage instead of the login page, so bots probing wp-admin do not learn where to log in.
Sends visitors who land on wp-signup.php to a page you choose (or the homepage) when network registration is turned off, instead of showing a bare "Registration has been disabled" screen.
Reads redirect rules from a redirects.csv file in wp-content, one "old path, new address, status" line each, so you can manage hundreds of redirects in a spreadsheet without a plugin.
Shortens category links from example.com/category/news/ to example.com/news/ and redirects the old addresses there permanently.
Stops comment reply links from creating ?replytocom= URLs that crawlers treat as duplicate pages, and redirects any such URL to the clean post address.
Removes comment feed links from the page head and redirects comment feed URLs to the homepage, while keeping the post feeds.
Makes the whole front end private: visitors who are not logged in are sent to the login page and returned to the page they asked for afterwards.
Sends subscribers, customers and other users without editing rights from wp-admin to the WooCommerce My Account page or the homepage, with options to keep the profile screen open and hide the admin bar. AJAX and front-end forms keep working.
Answers requests for pages you deleted on purpose with a "410 Gone" status instead of a 404, so search engines drop them from results faster.
After logging in on the My Account page, customers go back to the page they were browsing, such as a product or the cart, instead of the account dashboard.
After logging in, visitors land back on the page they came from instead of the dashboard, which suits membership and community sites.
Sends users to the network's main homepage when they log out from any site, giving the whole network one consistent exit point.
Adds a restrictive sandbox to iframes in posts that come from sites not on your trusted list, so an embedded page cannot redirect your visitors, open pop-ups or run scripts against your site.
Opens a chosen page directly when someone searches for an exact word or phrase, for example "contact" goes to your contact page and "returns" to your returns policy.
Takes customers to the shop page after they log in or register through WooCommerce, instead of the My Account dashboard.
Chooses where people land after logging in based on their role, for example editors to the posts list, customers to their account and subscribers to a members page.
When a parent page has no content of its own (it only groups subpages in the menu), visitors who open it are sent to its first child page instead of a blank page.
Redirects visitors and feed readers from your main feed to its address at a feed service such as FeedPress or Follow.it, while the service itself still reads your real feed.
Redirects logged-in users who visit the homepage to a members area, dashboard or account page, while guests still see the normal homepage.
When someone who is already logged in opens wp-login.php, they go straight to the dashboard (or the homepage for subscribers) instead of seeing the form again.
Users who cannot edit posts (subscribers, customers) land on the homepage after logging in instead of their admin profile. Staff still go to the dashboard.
When someone opens a page number that no longer exists, such as /category/news/page/40/ after you deleted posts, sends them to the real last page instead of a 404.
Redirects visitors who hit a missing page in a secondary Polylang language to that language's homepage, so they are not dropped onto a 404 page.
Takes shoppers straight to a product category page when what they search for is exactly a category name, such as "dresses" or "garden tools".