Removing dates from wordpress blog URL
-
Hi all,
Ours is website's blog is built with wordpress. We used to have the below URL pattern like may other websites: www.website.com/blog/2016/04/10/topic-on-how-to-optimise-blog.
Recently we removed the date and made the URL pattern to just like: www.website.com/blog/topic-on-how-to-optimise-blog
All the links have been generated with new URLs across the blog. Still all the old URLs have been reported as crawl errors in search console. I am wondering will there be any auto redirect formula to redirect all the old URLs to new URLs.
Thanks
-
Hi,
You could add the following code to your .htaccess to redirect all dated urls to non-dated version:
RedirectMatch 301 /([0-9]+)/([0-9]+)/([0-9]+)/(.*)$ http://www.**domain**.com/$4
Change domain.com with your domain name.
This should create a redirect from http://www.website.com/blog/2016/04/10/topic-on-how-to-optimise-blog to www.website.com/blog/topic-on-how-to-optimise-blog (and every similar situation).
-
Apache
-
Hi,
In some cases your SEO Plugins should have made sure to update the redirects. But what you could do is a check on if there is a number/number in your URL and have it rewritten/redirect to make sure the old URLS will be redirected to the new ones. In the end the only thing you'd have to do is make sure the dates are stripped.
Are you using NGINX or Apache?
Martijn.
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
-
Setting up redirects from non wordpress
Hi, we are rebuilding our site which was built on WordPress. The old permalink structure was /%post_id%/%postname%/ The new site is a custom build (not Wordpress), however, we are using WordPress for blog posts. The URL structure is www.customewebsite/blog/ As the custom site is not WordPress, we do not know how to create a redirect to push the WordPress url /%post_id%/ to the /blog section of the new site. What we currently get is page not found. Can anyone help with the htaccess redirect code? Many thanks one and all.
Intermediate & Advanced SEO | | Taiger0 -
Google Webmaster Remove URL Tool
Hi All, To keep this example simple.
Intermediate & Advanced SEO | | Mark_Ch
You have a home page. The home page links to 4 pages (P1, P2, P3, P4). ** Home page**
P1 P2 P3 P4 You now use Google Webmaster removal tool to remove P4 webpage and cache instance. 24 hours later you check and see P4 has completely disappeared. You now remove the link from the home page pointing to P4. My Question
Does Google now see only pages P1, P2 & P3 and therefore allocate link juice at a rate of 33.33% each. Regards Mark0 -
New my domain.com/blog option vs. my blog.mydomain.com option
Our e-commerce site has been on Big Commerce for about a year now. One thing many SEO folks had told us is that having a blog located at /blog was going to help more than a subdomain blog. option. BC has never had the option to have a blog hosted on their platform (/blog) until now. I am now wondering, since we have lost traffic in the past and are trying everything we can to regain it, if we should purchase the Wordpress Site Redirect upgrade and move the subdomain blog (blog.) to the new site option /blog. Any help or feedback from you is very much appreciated. I have attached a screenshot of our main website vs. our blog from Open Site Explorer in case it helps anything. I29Tw5P
Intermediate & Advanced SEO | | josh3300 -
Consensus on Paying to Remove Links
Hi all, For discussion... I am painstakingly working my way through a link profile, highlighting 'unnatural links' and contacting webmasters to try and get the links removed - I haven't got as far as 'disavow' or a 'Reconsideration Request' I have found a large number (around 150) of links from http://www.bookmarks4you.com and when I have attempted to contact the site for link removals I have had a payment request in order to do so. Now the amount being requested is low and so it may be worthwhile, however, I wondered what the consensus was with regards to this sort of demand? I know I could simply add the links to my 'disavow list' but for the sake of a small payment, I could get rid of them much quicker! Also, the majority of sites that I am contacting only have a contact from as opposed to an email address that I can use directly - what I am doing is taking a screen print of each contact form in order to have proof that I am actually doing the 'hard graft' as opposed to simply adding sites to a disavow list - is this a worthwhile exercise? Many thanks Andy
Intermediate & Advanced SEO | | TomKing0 -
Client has been COPYING blog posts to wordpress.com for years. Now what?
Just discovered my client has been copying all her blog posts over to her wordpress.com blog account. So she has duplicate content to what is on her site. She has roughly 700 posts on her main site but doesn't look like that many on the wordpress site. There are no inbound links coming off the wordpress site that I could find. Here's an example: http://thevanillaqueen.wordpress.com/2013/01/30/is-canola-oil-a-healthy-choice/ http://vanilla.com/is-canola-oil-a-healthy-choice/ What are you recommendations for what should be done? Thanks!
Intermediate & Advanced SEO | | katandmouse0 -
Strange URLs, how do I fix this?
I've just check Majestic and have seen around 50 links coming from one of my other sites. The links all look like this: http://www.dwww.mysite.com
Intermediate & Advanced SEO | | JohnPeters
http://www.eee.mysite.com
http://www.w.mysite.com The site these links are coming from is a html site. Any ideas whats going on or a way to get rid of these urls? When I visit the strange URLs such as http://www.dwww.mysite.com, it shows the home page of http://www.mysite.com. Is there a way to redirect anything like this back to the home page?0 -
Overly-Dynamic URLs & Changing URL Structure w Web Redesign
I have a client that has multiple apartment complexes in different states and metro areas. They get good traffic and pretty good conversions but the site needs a lot of updating, including the architecture, to implement SEO standards. Right now they rank for " <brand_name>apartments" on every place but not " <city_name>apartments".</city_name></brand_name> There current architecture displays their URLs like: http://www.<client_apartments>.com/index.php?mainLevelCurrent=communities&communityID=28&secLevelCurrent=overview</client_apartments> http://www.<client_apartments>.com/index.php?mainLevelCurrent=communities&communityID=28&secLevelCurrent=floorplans&floorPlanID=121</client_apartments> I know it is said to never change the URL structure but what about this site? I see this URL structure being bad for SEO, bad for users, and basically forces us to keep the current architecture. They don't have many links built to their community pages so will creating a new URL structure and doing 301 redirects to the new URLs drastically drop rankings? Is this something that we should bite the bullet on now for future rankings, traffic, and a better architecture?
Intermediate & Advanced SEO | | JaredDetroit0