Redirect wordpress from /%post_id%/%postname%/ to /blog/%postname%/
-
Hi what is the code to redirect wordpress blog from site.com/%post_id%/%postname%/ to site.com/blog/%postname%/ We are moving the site to a new server and new url structure.
Thanks in advance
-
Hi Tim, thanks for your help.
Yes wordpress will be installed in a folder /blog/
So it should be quite simple to do this redirect!
Regards Tai
-
First off, I would imagine you need your wordpress installation to be inside a /blog/ directory on your server, unless you can do some fancy redirect.
Secondly, in order to change the URL structure from post id / post name. You can do this in your wordpress settings.
Go to -> Settings -> Permalinks.
You will need to select a custom structure, something like
/%postname%/or if you wish to keep hold of the ID
/%postname%-%post_id%/Then save your settings.
Hopefully that does the trick.
Cheers
Tim
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
-
MOZ is showing that I have non- indexed blog tag posts are they supposed to be nonindexed. My articles are indexed just not the blog tags that take you to other similar articles do I need to fix this or is it ok?
MOZ is showing that my blog post tags are not indexed my question is should they be indexed? my articles are indexed just not the tags that take you to posts that are similar. Do I need to fix this or not? Thank you
Intermediate & Advanced SEO | | Tyler58910 -
Should I no-index categories of my blog?
I have blog with lots of articles & it also has lots of categories. These categories are currently indexed in the google and moz showing missing title and description for these categories. Should I place no-index tag in all the categories or leave it as it is?
Intermediate & Advanced SEO | | jhakasseo0 -
New Alternate View Redirection
Hi, We are merging two sites, differentiated by the type of customer (consumer or corporate). Currently we have:
Intermediate & Advanced SEO | | seoeuroflorist
www.consumersite.com/product/
www.corporatesite.com/product/ When on the new site, the type of customer can be switched by clicking 'Corporate' or 'Customer' which adds ?user=Business or ?user=Private to the url which then redirects so the URL is the same but certain features have changed. We block ?user=Business and ?user=Private in URLs in robots.txt to prevent duplicating pages. Should we redirect like: www.corporatesite.com/product/ -> www.consumersite.com/product/ Or: www.corporatesite.com/product/ -> www.consumersite.com/product?user=Business (this will then redirect but the parameter is blocked by robots.) I'm concerned redirecting to a URL that is blocked from indexing is an obvious error. Any ideas are welcome. Thanks!0 -
Domain Redirect and SSL Cert
Hi, When redirecting an entire site to another domain, do you have to maintain the SSL certificate? The SSL expires 3 days before the planned redirect. Thanks in advance.
Intermediate & Advanced SEO | | sofla_seo0 -
Back links Building and article/blog posting
Hi all, I have been researching the best way for back links building, and I would like to ask few questions before I start. Which one of these tools would you recommend for back link building diagnostics. www.linkrisk.com - www.linkdetox.com What would be the best procedure to begin creating healthy back links? Would looking at my competitors back links help me? What would be the recommended amount of back links created per week? Also how many blogs entries should we aim to create per week? The website i'm working on is manvanlondon.co.uk If you guys have any further suggestions please let me know. Many thanks for your time.
Intermediate & Advanced SEO | | monicapopa0 -
Blog tags are creating excessive duplicate content...should we use rel canonicals or 301 redirects?
We are having an issue with our cilent's blog creating excessive duplicate content via blog tags. The duplicate webpages from tags offer absolutely no value (we can't even see the tag). Should we just 301 redirect the tagged page or use a rel canonical?
Intermediate & Advanced SEO | | VanguardCommunications0 -
Redirecting 404 pages
Hello,We have a wordpress site that has some "hidden" pages with weird URL's. Due to the way the site was built (not by us) if we setup our standard practice for 404 pages some site functionality will be lost.Standard Practice for 404's www.domain.com/fafsaf shows 404 error pageProposed solution:- www.domain.com/safaf >forwards to> www.domain.com/404 - shows 404 error page. Will this stop the search engines indexing the pages? - we have also amended the robots.txt to try and stop some pages being indexed but we still keep finding the odd little "hidden" page.The aim is to try and get all the search engines just to index the few simple pages on the sitemap instead of finding all these extra pages.
Intermediate & Advanced SEO | | JohnW-UK0 -
301 Redirection and apostrophes in URLs
Hi I am experiencing trouble getting any redirects with apostrophes in the URLs to 301 redirect in order to eliminate 404 errors. I have tried replacing the instance of the apostrophe in the source URL field to %27 and variations of this but to no avail. The site is a wordpress site (the old URLS are legacies from the old Business Catalyst site) and I am using the redirection plug in. I have gone into some detail with a helpful soul here http://wordpress.org/support/topic/how-to-deal-with-apostrophes-in-source-url but unfortunately to no result. If anyone has any idea how to solve this puzzle I would be grateful for the help. Example: http://www.tesselaars.com/blog/Inside_Flowers/post/Online_Marketing_for_Florists_Part_1%E2%80%93_A_Website_You_Won%27t_Regret/
Intermediate & Advanced SEO | | Seamoose0