Redesigning a really old Website with old-fashioned permalinks
-
Hey SEO-Pros,
I'm currently redesigning a quite old website, with the following URL structure:
TLD/category/category.php?interview_id=819
The new Version will be a little more SEO-friendly:
TLD/interviews/name-of-interview/
I know I have to do a 301-Redirect for all the old URLs to the new ones in order to keep the (until now pretty good) Google Ranking. If the rankings drop after the redesign has been done, I'll surely get killed
So, Is there any easy way of creating these 301-Redirects (must be thousands of URLs...)?
Best Regards guys and thanks for your help!
-
Thanks Ryan, so this means to get for example interview_id=819 redirected to the correct article, I have to provide the ID also in the new URL?
TLD/category/category.php?interview_id=819
to
TLD/category/interview-name-819
Should be something like this in Regex:
RewriteRule ^category/([^/]+-)?([0-9]+)/?$ category/category.php?interview_id=$2
EDIT: After working on it the whole day I found the following solution (as I'm working with Wordpress). Maybe it is useful for anyone:
I'm using the following function now:
add_action('parse_request','oldsite_redirect',0); // 0=before (most) 'parse_request' calls
function oldsite_redirect() {
if (isset($_GET['interview_id'])) {
global $wpdb;
$sql = "SELECT post_id FROM {$wpdb->postmeta} " .
"WHERE meta_key='interview_id' AND meta_value='%s'";
$sql = $wpdb->prepare($sql,$_GET['interview_id']);
$post_id = $wpdb->get_var($sql);
if ($post_id) {
$permalink = get_permalink($post_id);
if ($permalink) {wp_safe_redirect($permalink,301);
exit;}
}
}
}Solution found here: http://wordpress.stackexchange.com/questions/12824/url-rewrite-based-on-a-custom-field-value/
-
Regex is the replacement language used to provide the logic for redirects. If you can establish a logical pattern for the redirects, then someone can write the Regex expression to perform the work.
For example, if you used category ids and whenever category_id=1 you wanted it to be replaced with /interviews, you can write an expression to do such.
Without seeing more information specific to your situation, I cannot comment if you can benefit from this method. In brief, try to find a pattern and articulate it. If you can say "I want to replace X with Y" then the solution will typically work.
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
-
404 errors & old unused pages
I am using shopify and I need to delete some old pages which are coming up as 404 errors (product no longer available!) does anyone know where you go to delete these pages which are no longer needed?
Web Design | | carleyb0 -
Is there an issue if we show our old mobile site to Google & new site to users
Hi, We have our existing mobile site that contains interlinking in footer & content and new mobile site that does not have interlinking. We will show existing mobile site to google crawler & new mobile site to users. Will this be taken as black hat by Google. The mobile site & desktop site will have same url across devices & browsers. Regards
Web Design | | vivekrathore0 -
SEO Consulting for HUGE Website. How Big Is TOO Big Of A Change?
SEO Consulting for a HUGE Website. Their h1 tags have instagram/twitter, h2 have their menu/what's trending and h3 is the article title. Here's what I want to do... MY MAIN QUESTION: This site has tens of thousands of pages, all articles beyond the few dozen category/tag pages they have. If I change the structure to the following, will it be too much of a system shock to Google? Will this actually HURT them? Currently on the site: - h1 tags point to Twitter/Instagram sidebar widgets
Web Design | | BrianGilmore
h2 tags point to the menu/what’s trending section (which is the same on every page)
h3 points to the Title of the Article I want to change it to this: - h1 tags should delineate the article's name. That's all they should really be used for.
h2-4 should be reserved for article subheadings to be used by the editorial staff. EDIT: 30% of their >11 million monthly uniques come from search. I don't want to eff with that, but the way that NONE of their pages have optimized words, they have no sitemap, webmaster tools and are still doing this well makes me think that even putting in minimal changes to tidy things up will help them bring it to 70% organic search.0 -
New website and new domain
Hi, We have a domain with current e-commerce site on, about 5 years old. We have a new website being built with a different company and a new domain name. We are transferring our old domain over to new provider and 301'ing the domain to new domain. However, we can not take the current website with us, so we lose all our links/pages etc.. How important would it be to take a wrap of our current website to keep all the pages alive? Is there anything we can do so oldurl.com/brand/tshirt/ doesnt lose its rank? Can we 301 individual pages if we dont have the actual website? Just the domain name. Any help be great. Thanks
Web Design | | YNWA0 -
For a real estate website, is a different mobile site warranted vs a responsive site?
I researched the major real estate websites: Zillow, Trulia, Remax, Keller Williams, Century 21, etc. They all have a separate mobile site and not a responsive one. The client wants it to be easy to search for properties from a smartphone. Is it possible to get a responsive version of a real estate website on a smartphone?
Web Design | | MassMedia0 -
Google result showing old Meta Title / Description even though page view source shows new info.
Hey guys! I'm struggling with why Google is ignoring my Meta Title / Description. I made a pretty drastic change to both about a week ago and on the results it hasn't changed. I'm on first page with several keywords and I think this weird caching is hurting me on where I'm at on the page. Thoughts / Ideas?
Web Design | | curtis_williams0 -
SEO while designing the website and continuous SEO
What's the difference between SEO while designing/developing a website (ie, setting up a website so it is crawled by search engines) and the SEO that people talk about that needs to be viewed analyzed and changed all the time? I don't have a ton of money to spend on SEO right now but I do want to make sure my website is set up by an SEO expert (if possible) so when I do have money to spend on SEOthe website is set up properly to work with more advanced forms of SEO. I guess I don't understand where you can draw the line (if forced due to money constraints) between SEO in the beginning and continued SEO. What do I need to look for with SEO and the design of my website. How do I get some type of SEO without breaking the bank??
Web Design | | CapitolShine0 -
How do you visualize website structure
How do you visualize a website structure in terms of (categories of) pages and interlinking. I use such visuals for discussing what you are actually doing now and what can be improved. I have made visuals I few times myself (basically making boxes representing categories of pages and lines representing internal links), but I found that I soon ran into a scheme of huge proportions and needed more paper and more time. Appreciate your thoughts!
Web Design | | NewBuilder2