Facebook forcing a redirect - wordpress

For some reason, Facebook is picking up on a redirect on my posts which is leading to issues with sharing.
Take a look: https://developers.facebook.com/tools/debug/og/object/
Then try this URL in the debugger: http://punsdepot.com/pun/22
What's odd is if I change the permalink structure to use the post slug, it doesn't redirect.
I disabled all plugins to see if it was plugin related and found nothing. I also tried a couple of redirect detectors and everything seems to come back as a normal 200 response.
Any ideas?

Related

Need wildcard 301 redirect for WordPress on IIS

I'm running a WordPress blog on IIS. I currently have the permalinks for the articles set to:
/%postname%/%year%-%monthnum%-%day%/%hour%:%minute%
So a sample article would be, right now:
https://example.com/headline-here/2019-02-11/15:45
I now want to change the permalink URL to not have the time at the end, which I can set up in WordPress just fine. In fact right now if you go to
https://example.com/headline-here/
It actually works without changing anything.
However, when I change the permalink in WordPress, the old links with the time at the end no longer work. This is a problem for Google, since it'll see my whole indexed site as 404 page not found errors.
I want to put in a single rule in Web.Config that will redirect:
https://example.com/[ALL-HEADLINES]/* (anything after the headline being the "*")
To:
https://example.com/[ALL-HEADLINES]/ (basically redirecting as a permanent 301 when someone/Google links to the previous URL with the time) To be clear, if someone goes to:
https://example.com/headline-here/2019-02-11/15:45
They're automatically redirected to:
https://example.com/headline-here
Can I do this in Web.Config? Or can I do this in WordPress (I've tried, I think not).
I don't want any 404 errors. I want them all to be 301 permanent redirects.
Is there a simple way to do this?

Specific WordPress permalinks link to wrong page

I have a somewhat strange issue with WordPress today. This behaviour has only begun in the last week or so as far as I can ascertain.
Any page with the slug "downloads" links to it's parent page instead of to it's own page.
I have tried the following:
Reset permalinks to default and then back to %postname%
Disabled all plugins
Physically cleared the cache
But none of the above fix the issue. The weird thing is that this behaviour is only happening for pages with the slug "downloads". For all other slugs it is fine.
For example there are multiple instances of the slug "get-involved" with different parents and all work fine. But when the same is done with "downloads" the links redirect to their parent. Is anyone else experiencing this issue?
I have also verified in fiddler that the pages are not redirecting, they are actually linking to the parent page with a response code of 200, there is no 301 or 302 thrown.
WordPress will automatically duplicate the same slug with a new name but you should check again, maybe you've re-writing slug manually before. And check your .htaccess.

404 on taxonomy links on Wordpress site

I've read a lot of different posts online on this, but nothing seems to be working.
I'm working on a Wordpress site. Despite individual post links working exactly as intended, (e.g. http://ubicomplab.org/people/jwu), the main taxonomy pages, http://ubicomplab.org/people, etc. redirect to 404.
I have tried modifying .htaccess, deleting .htaccess, disabling plugins, but nothing seems to work. I have also tried rolling back the contents of wp-content to way before this error started occurring, to no effect.
Upon trying to "Edit Page" the 404ing link above, I get an error about how "post 422" is in the trash. There are no posts in the trash, however. I'm not sure why it's specifically post 422.
Could there be something wrong on the server side? If so, what could I do? I have access to the kettle server, but I'm not sure where to begin looking.
Try savings your permalinks again, sometimes this works for me.

WordPress RSS Feed Returning 404

We have an RSS feed (or we should have) via wordpress but it is just giving using a 404 Page Not Found on load - http://www.warrenaccess.co.uk/feed/rss2
We have tried changing back to default theme and deactivating all plugins to see if we could find an issue but it still didn't work.
Does anyone have any idea what could be causing this?
My hunch is that you don't actually have any blog posts, but you are using WP as a pseudo-CMS. From having looked at the feed and network conditions (CDN / cloud hosting can sometimes ignore feed content), things are working as they should.
Your 404 does provide some useful information about the feed:
<lastBuildDate>Fri, 11 May 2012 10:14:42 +0000</lastBuildDate>
Which is awhile ago, relatively speaking. I'm guessing that your site content is all based on pages, which don't and shouldn't actually show up in RSS feeds.
To fix the problem, you'd have to make some blog posts or try this plugin or its variant:
http://wordpress.org/extend/plugins/rss-includes-pages/
Edit: turns out WP syndication setting was set to show -1 posts. Fixed by setting it > 0.
I was using custom post type for my primary website content, so to include more post types use this in your functions file:
function customfeed_request( $request ) {
if ( isset($request['feed']) && !isset($request['post_type']) ) {
$request['post_type'] = array('post', 'my_custom_post_type');
}
return $request;
}
add_filter('request', 'customfeed_request');
I spent a lot of time fixing this; I hope this helps someone.
The scenario: when Permalinks is off, I can access the RSS Feed url "/?feed=rss2" without error, but enabling the Permalinks the above returns the feed content and after this, an 404 error code. It is possible see the error code response under network browser inspection tools, like "Web Developer" plugin of Chrome.
Well, the feed client does not understand this error code and raises an exception, breaking the consumption page.
I traced the problem to the WP Super Cache. I think the cache does not generate the feed response content, but it tries to get the cache file and it donĀ“t exist, resulting in error 404.
The simple solution, disable feed cache in "Advanced" topic of the "WP Super Cache Settings", checking "Feeds (is_feed)" options and save.
Perhaps your issue is in WP Super Cache.
I just had a similar issue happen to me but perhaps the cause could be a bit different. I made a custom RSS feed. I was getting the page 404 error.
The reason is that I was not doing a flush rewrite (https://codex.wordpress.org/Function_Reference/flush_rewrite_rules). Can do this by going to settings > permalinks and then just updating it. Then feed is available.
Was the solution for me anyhow.
have you checked your .htaccess
Turn it off by renaming it to something jibberish
If that doesn't help check your wp-config.php
What are we suppose to do if the product URLs are returning 404 i.e. www .abc .com/product /name/feed/ Rest everything is fine on web but only product feed URLs are 404. Also can it cause any performance issues and rank my website down?

Migrating Wordpress Permalinks from postname to post_id/postname

My blog's been up for a year or so, and 90% of our traffic comes from Google, so I want to make sure that I'm handling this permalink change properly. I recently read on Wordpress' codex that including the numerical %post_id% at the beginning of your permalinks can greatly reduce the stress on your database, when a post or page is being fetched. So, I decided to change my permalink structure from /%postname%/ to /%post_id%/postname/.
Now, if I type in, or click on a link to my site in google that looks like this - http://blog.com/cool-post/, it seems to redirect to my new structure: http://blog.com/34424/cool-post/ without a hitch. I'm trying to figure out whether I need to use a 301 redirect plugin or not. I would like to think that search engines like Google will see the same "flawless" redirection that I'm seeing. There doesn't seem to be any broken links. Just looking to confirm that I'll be okay after this change.
Thanks
WordPress handles canonical redirects for you by sending 301 Moved Permanently status codes appropriately. That status code ensures Google will only index your posts by the new URLs (i.e. with the post IDs in your permalinks). I've not used a redirection plugin for a while and my sites have been indexed similarly just fine.

Resources