Just did some testing and seems there is a bug here.
Newly created draft posts are not accessible on front-end. Search bot (or anyone else not logged in and using special preview URL) gets 404 error on them.
But if you publish and change back to draft then post remains available by direct link (does get removed from index).
For this reason I would stay away from using draft for this purpose. I would try to use custom field to mark post as expired and filter the_content
to show informational message and set headers with status_header()
function.
Related Posts:
- Disable front end to use as CMS only?
- How to prevent automatic redirection of 404 errors and “incorrect” URLs?
- Redirect Localhost wordpress site to dashboard
- Why is wp_redirect() preferable to a standard PHP header redirect?
- How to redirect a sucessful registration to a page template?
- How to redirect all requests to wp-login.php?
- Index in root, wordpress in subdirectory
- WordPress overriding actual subdirectories
- Redirect to “All Posts” after post update or publish in Block Editor
- Redirect user after login/registration globally
- Redirection errors
- WordPress CMS – hide content from public while in editing stages
- Redirect to a page after a few seconds
- How to redirect only if page doesn’t exists
- how to do logout redirect to current url
- htaccess redirect – directory and subpages to a single page
- Plugin for conditional redirect
- url keeps redirecting to a page
- https multiple redirects
- Redirects from Tumblr to new WP
- Why does multisite bypass WordPress for wp-content, wp-admin, wp-includes and .php files?
- Redirecting to old domain, tried everything, nothing works
- How to modify the Register link in the login page?
- WordPress redirecting to 127.0.0.1 when accessing the site from a remote device
- Changing “Lost Password Email Link” to custom password reset page
- Redirect a page id url but not the page slug
- Redirect based on parameter in url
- Stop wordpress redirecting www to non-www
- WordPress Global Redirect
- Why does wp_redirect strip out %0A (url encoded new line character) and how do I make it stop?
- htaccess redirect – replace special character
- Redirect Logged In User if page is wp-login.php and $_Get[‘level’] = X
- WordPress url incomplete redirects to first article with that name
- Right hook to redirect frontend visitors while respecting rest api plugins to run first?
- Redirect loop after changing nameserver [closed]
- Create a page that automatically redirects to latest post of a specific tag/category?
- Is it possible to incorporate username in a login redirect?
- How to make wordpress folder (/wordpress) redirect to /?
- Changing domain
- I need to redirect an entire subdirectory in WordPress to the homepage – is this correct?
- My website on checking showing 403 error on HTTP Status [closed]
- I get redirected too many times only in wp-admin?
- Redirecting Pages That No Longer Exist — But Could in the Future
- How do I determine what is causing a redirect for a given page?
- Trouble running local WordPress in Google App Engine
- About to migrate site to new domain
- Redirect all users to dashboard unless custom post type
- Redirecting connection from IP to localhost
- WordPress directing to Posts page (edit.php) instead of saving post
- HTML Redirect to WP pages
- How to redirect 40,000 urls with the same url structure efficiently?
- Changing theme = change home page for mobile visitors?
- Redirect User on Login based on role WP 3 – Multi-Site
- production site routes to staging site after cloning
- Redirect old URL (with different post ID) to new URL
- How to redirect an old page url to the homepage
- Custom URL routes
- Delete Redirect Slug For Specific Post
- Duplicated WP site manually, now links redirect wrong [closed]
- redirecting an entire WP site from one top level domain to another
- Load function with login_redirect
- Missing domain http://./wp-… in redirects
- All URLs Redirect to Main Page
- 301 redirects in Headway based WordPress Site
- Why I am not able to direct user to my blog section without login?
- Force User Login
- Import RSS as posts with redirect?
- Parked domain redirecting to wrong error404 page
- Subdomain redirect problem
- redirect from old URL structure
- How to Redirect WordPress domain.com/?anyword to 404 Page?
- How can I prevent caching of wp_redirect?
- Is the default value of FORCE_SSL_ADMIN documented?
- Redirect Category Media ‘URL’ when clicked
- Error in /blog redirection – ubuntu default WP installation
- wordpress automatic URL ‘page’ parameter rewrite
- Changing post depending upon where you’re redirected from?
- 302 redirect *.at/site redirecting to .comsite
- Loading /wp-content/uploads/site as /site/
- How to redirect user to the specific URL and display notice
- when contact form7 submited domain redirects to example.com means (example domain)
- WordPress not loggin user and redirecting after custom registration
- How to manage around 90k 301 redirects after migration from old CMS
- Local domain remap with proxy : Infinite 301 redirect, bad URL typo
- How to 301 redirect to subdirectory but keep access to wp-admin of main domain
- Pagination redirect set in .htaccess file is not working
- Count users redirected from Facebook
- Redirecting a POST to a php script
- automaticly redirect link problem on update
- WordPress Login Page redirecting after failed login
- Redirect after empty register form
- Displays url’s twice and getting 404 errors after activating
- Redirect once on first visit
- How to permanent redirect old domain to new one. in case amazon store
- Bookmark anchor link to load another page first before completing?
- How to map secure.domain.com to www.domain.com or domain.com with “WordPress MU Domain Mapping” on the primary multisite domain?
- Simple Redirect but getting the right code?
- How to redirect non-logged in users to wordpress login page and bypass some page IDs?
- Is RewriteMod for WordPress site: site.ro -> site.com/?lang=ro possible?
- How can I redirect the user to the page they were on when they clicked “Lost Password” using “retrieve_password_message” filter