Mod rewrite question
-
Sorry in advance if this isn't the best place to ask this question.
Google Webmaster Tools has recently identified a ton of "Not Found" pages, which are actual pages with some digits appended at the end.
For example, suppose an actual page on my blog is:
(A) http://www.example.com/blog/2012/09/my-post-title/
This page works just fine.
However, GWT has identified the following page as a "not found" page:
(B) http://www.example.com/blog/2012/09/my-post-title/9157586677/1846732913010
This appears to be happening to hundreds of posts on my site. In each case, the "9157586677" portion of the URL is identical, but the remaining 13 digits change from page to page.
I haven't been able to determine exactly what is causing this to happen - it's probably a social plug-in for Wordpress, or perhaps Disqus, but I'm not sure which one. I'll go through a process of elimination to narrow it down over the coming week.
As a quick fix, I'd like to create a ModRewrite rule so that requests for (B) get 301 redirected to (A). Since there are hundreds of posts, I need to do this in a way that works regardless of what's in the "/2012/09/my-post-title/" part of the URL.
Unfortunately, mod-rewrite is outside of my area of expertise. Can somebody please suggest how I can handle this? Thanks in advance.
PS - As for tracking down the cause, I've looked at the source of the pages in the "Linked From" area of GWT and the Not Found link is nowhere to be found. That is why I assume the bad link is being generated by some javascript that is a part of one of my plug-ins.
Update: It seems like Disqus is the source of these phantom links. There's considerable discussion here. I'll continue searching for a long-term solution. Meanwhile, I'd still appreciate help with the mod-rewrite question above. Thanks again.
-
I've found a solution and am posting it here in case anybody else is having the same problem:
RewriteRule ^([0-9]{4})/([0-9]{2})/([^/]+)/[0-9]+ /blog/$1/$2/$3/ [L,R=301]
-
I hadnt seen the update over Disquss at the end of the post.
Please, post all your advances on this topic Ahirai
Best regards!
-
Hi ahirai,
I was gonna say you should check the linked from tab in GWT but since you actually did it, for me its pretty sure that a plugin that drives content is creating this issue from scratch.
Since i´m neither an apache expert, i can´t give you a method to do the dirty work, but i can tell you the problem is created by some 3rd party plugin driving content of site.
Please, post your advances in the topic!
Good luck!!
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Sitemap question
Hello, In your opinion what is better for a root domain and micro-sites using sub-domains?, to have a single sitemap for the root domain including all links to the sub-domains or to have a separate sitemap for each sub-domain? Thanks Arnold
Technical SEO | | arnoldwender0 -
Moving Blog Question
Site A is my primary site. I created a blog on site B and wrote good content and gave links back to site A. I think this is causing a penalty to occur. I no longer want to update site B and want to move the entire blog and it's content to sitea.com/blog. Is this a good idea or should I just start a fresh/new sitea/blog and just remove the links from site B to site A?
Technical SEO | | CLTMichael0 -
Sitemap Question - E-commerce - Magento
Good Morning... I have an ecommerce site running on Magento and the sitemap is automatically generated by Magento based on the categories and sub categories and products. I have recently created new categories that i want to replace the old categories, but they are both in the auto-generated sitemap. The old categories are "active" (as in still exist if you know the URL to type) but not visible (you can't find it just by navigating through the site). The new category pages are active and visible... If i want Google to rank one page (the new category page) and not the old page (old category page) should i remove the old page from the sitemap? Would removing the old page that used to target the same keywords improve my rankings on the newer category page? Sitemap currently contains: www.example.com/oldcategorypage www.example.com/newcategorypage Did I confuse you yet? Any help or guidance is appreciated. Thanks,
Technical SEO | | Prime850 -
Redirecting a questionable domain to a trusted domain
I have a question!
Technical SEO | | FDFPres
We have 2 domains operating within the same retail sector. One of them is for our bricks and mortar business and the other is a new brand we launched as a nationwide e-retailer. We aggressively built links for the new one and achieved some very good search positioning, where we remained for about 4 months until the google updates of the first half of this year started biting. The domain never received a warning from google or anything, but the links have clearly been devalued to a point where the domain is now virtually buried for the most competitive terms. However, the domain does still get around 100-200 visitors per day, and has a DA of 38. We're thinking about a reshuffle that would involve putting the products in to our brick and mortar business website, and redirecting the brand domain to the bricks and mortar domain. Thank you for reading this far! the question is then, is there a danger of the bricks and mortar domain being tarnished by this? as i said the brand domain hasn't had any notices of penalty from google but it has definitely been hit by updates.0 -
Site command / Footprint Question
Hi All, I am looking for websites with keywords in the domain and I am using: inurl:keyword/s The results that come back include sub-pages and not only domains with the keywords in the root domain. example of what i mean: www.website.com/keyword/ What I want displayed only: www.keyword/s.com Does anyone know of a site command i can use to display URL's with keywords in the root domain only? Thanks in Advance Greg
Technical SEO | | AndreVanKets0 -
The Ultimate Question
This is probably going to look bad, but Im going to do it anyway. Ive owned my own business for over twenty five years. Due to the economy and a health crisis, my business has come to an end. Im left pretty much with nothing except my family, which is on shakey grounds as well. anyway. Ive been working on the IM, SEO thing for about two years. Ive made some money, but nothing that would make a difference to my situation. I now have a site in a competitive niche. The site is rated A by the app here on seomoz. But my site is lacking in authority backlinks. I write my own posts, about two a day, and honestly, it is of much better quality than those ranking . My site stays right around #11. Every other day, the site goes to #7 or 8. When that happens, I make between 300-400 a day. Then it falls back to 11. So the on site is good, rated A here. My site is speedy Not enough backlinks The content is good I was foolish enough to believe the G story about backlinks not being important. Concentrate on the content. All of that crapola. The sites that are ranking well have all the typical xrumer links. Totally not related links. Junk. And from what Ive seen, I believe the sites ranking 1-3 are making about $1000. a day. So you can imagine what being this close, after losing so much is doing to me. So.... Right now I am just writing content, pinging, social bookmarking and submitting rss feeds daily. Does anyone have any real information on how to bump my site up in rankings. Please, no stories about guest blogging, or attempts to sell me your SEO service I know I would do it for someone else and I have many times in the past. If you can help me, please reread, and contact me. I wish you all the best. Sorry for the melodrama.
Technical SEO | | vansy0 -
Frustrating Local Seo Question
I have just lost the top stop on Google Places (Pack 7) for one of my clients. The company that took it came out of nowhere to take the top stop. Now I don't mind getting out ranked when someone has worked hard to out rank me but what is frustrating is this site scores terrible across the board on just about every score that is supposed to determine on and off page ranking factors. The only place it outscores is in the link department but the site is so new there is no data available in OSE. The site has 0's and 1's for PA, MR and MT plus the keyword (kitchen remodeling) that it is taking the top spot for scores and F in the SEOMoz on page report card while the page that I optimized for this very same keyword scores an A. Plus this site has zero citations according to Bright Local Data. What Gives? Here is a little bit of data: Keyword: Kitchen Remodeling My Clients website is http://www.tandmkitchens.com Competitors website: http://www.njkitchendesigns.com I'm kicking his butt in every category except Domain Age and inbound link total, his inbound link total is 409 but it's only from 2 domains.
Technical SEO | | fun52dig
Any thoughts on how this is possible would be greatly appreciated. Thanks all and Merry Christmas!
Gary1 -
How to properly abandon mod rewrite?
Hi, We've done mod-rewrite to our .php files to show .htm files several years ago for SEO purposes. My question is, doing this has become a hassle for adding new pages, etc. and I'd like to make a clean break with the .htm and move to their real file names and or directories (e.g. company.htm --> /company/ ). What kind of ranking penalty am I looking at if we switch? We're a small company with billion dollar competitors so a rank loss would be fairly devastating. I assume I'd need to do 301 redirects for all of the old file names (obviously yes for the change from page to directories) but for each individual page? Thanks, Matt
Technical SEO | | mynewco0