I migrated my site 2 years back (flash based to responsive). But Google crawler still complains that the old files are not reachable. Few times, I marked them fixed in the webmaster tools site. But still producing those errors. Some one mentioned in Google forum, just leave them as errors for a while and crawler marks itself these as obsolete after few attempts. This approach is also not helping. The site is a *nix GoDaddy-site with .htaccess file. Any ideas?
I think it will work if you set up an http re-write rule for your web server, defining the content as http 301, Moved Permanently. Then the crawl bot will start looking in the new place.
So, the bot request:
GET /index.php HTTP/1.1
Host: www.example.org
And the appropriate server response:
HTTP/1.1 301 Moved Permanently
Location: http://www.example.org/index.asp
I've done this with success before, on a forum site where we changed URL format after a year or so.
If the amount of links are not too big, you can redirect each and one of them by doing this in .htaccess:
Redirect 301 /old-page.html http://example.com/new-page.html
Redirect 301 /another-old-page.html http://example.com/another-new-page.html
And it seems that the mod_rewrite is enabled by default, so only type your redirects, and you're home free. When you've had them for a while, they can be taken away again.
Related
I run a website which seems to have a problem with 303 Redirects.
The CMS is TYPO3 9.5.24.
I don't know where the redirects are coming from. Unfortunately the 303 redirects are not listed in the network tab of the console (testet Chrome, FF). Why not?
The Problem is Facebook is not able to scrape the pages. Their Sharing debugger (https://developers.facebook.com/tools/debug/) tells me "URL requested a HTTP redirect, but it could not be followed."
I checked with https://www.redirect-checker.org/index.php, there I get a loop of 303 redirects.
I can view the website in any browser just fine, no problems there.
I checked .htaccess and the TYPO3 Backend for 303 redirects, but found nothing.
I suspected a server (nginx) misconfiguration but can't figure it out. Other websites on the same server do not have that problem.
Has anyone experienced similar problems?
Found the redirection in our custom code. Had nothing to do with Typo3.
Sorry for the confusion.
Thanks Peter Kraume, the curl check helped me to find the problem.
Appearently modern browsers ignore a 303 redirect loop, so i was not able to see anything in browser console.
Can be closed.
I found that anybody show their page to user, then 302 redirect to my site,
I want stop it.
I thought there would be referer in request header, but didn't!
I tested this in chrome72.0.3626.121 and ie11, and use fiddler to catch Request,
there have no referer header in all request.
And my server side code can't see referer too.
How can I stop 302 redirect to my site??
It's possible these days for sites to disable adding a referrer when a user follows a link. This is a privacy feature.
The result of sites using this feature is that you can't tell if:
A) A user opened your site directly from the addressbar
B) A user came to your site from somewhere else.
If you could tell the difference, it means the privacy feature is not working. Your only option is to block anyone with no referrer header, but then you might block a lot of other users as well.
There is one other common reason for this though, if you are running an insecure (http) site and you are being linked from secure (https://) site. It might be possible to get the referrer back in this case by upgrading your site to https.
I just moved my blog to https and, of course, all the facebook shares counters are now reset to 0.
I've spent several hours reading stuff online and I got the solution to point the og:url tag to the old urls (with http instead of https).
It worked for a day but now all the counters are back to 0.
The strange thing is that if I check the urls (both with https and http) with the open graph debugger it returns me 0 shares for both the urls!
I really don't know what to do! Is there a way to have back the counters of the http-version of the urls? Or, as an alternative, is there a way to sum the two counters?
p.s. I already activated the 301 redirect for the whole blog in my .htaccess file.
Facebook treats HTTP and HTTPS as two different URLs and therefor two different Open Graph objects, even if the rest of it is the same.
p.s. I already activated the 301 redirect for the whole blog in my .htaccess file.
And that's your mistake ... You need to keep the old HTTP URLs available for the FB scraper to read the OG meta data from; if you redirect the scraper to the HTTPS version as well, then it concludes that the HTTPS versions was the actual correct URL for this piece of content - and therefor you have just undone what you tried to do by having og:url point to the old HTTP address.
See https://developers.facebook.com/docs/plugins/faqs#faq_1149655968420144 for more details.
The scraper can be recognized by the User-Agent request header it sends - see https://developers.facebook.com/docs/sharing/webmasters/crawler
(How to exclude clients that send a certain user agent from redirection via .htaccess is something that should be easy enough to research.)
On a site we have a tag system. Recently we discovered that we have to rename most of the tags and redirect them. It looks like a job for 301 redirect, however some of the tags will be renamed incorrectly (because the process is automatic) and we will return them to their original name at a later time. When that happens we will need to do a redirect back to the original url and probably do a 301 again. Obviously at one time only one of the urls would do a 301 and all of this would happen within the same domain.
For example, we start with www.example.com/tag/foo.
Then the automatic name correction would change it to www.example.com/tag/bar and do a 301 from the previous address.
The automatic correction would be ok for most tags, but not this one, so we would eventually fix the url back to www.example.com/tag/foo and do a 301 yet again.
I tested it (using a site running locally) in Firefox 50 and Chrome 54 and both seem to handle the situation fine (when I redirect to the original address the browser forgets the old 301). Does google (and/or other browsers) also figure this out or am I better of doing 302 and hoping that google changes the address in the index rather than duplicate the pages?
You're using 301 Moved Permanently for what you admit in the comments is a 307 Temporary Redirect. So yes, that causes problems.
I made an error in structuring my clients site such that I unnecessarily added a path that was not needed.
What I did was this:
www.mysite.com/vehicles/ford
www.mysite.com/vehicles/ford/fusion
I have since modified the site such that it now reads -
www.mysite.com/ford/
www.mysite.com/ford/fusion/
Needless to say that Google is now reporting well over 1600 bad urls, ie. 404.
I am using Godaddy shared hosting IIS, the site is done in classic ASP.
I have the web.config file figured out for the url rewrites on the second generation but am hoping to get some help with the 301 redirect. I hope I don't need 1600 redirects, but rather some code that takes anything with /vehicles/ (and after) and redirects to another page, say the home page.
Here is what I have tried but it just takes me to /vehicles/acura/