Changing a page's URL alias breaks existing links. "would be nice" if a module could track and provide 301 redirects
Currently, when you use a URL path alias to an existing node, and later decide to change the URL alias, the old path 'breaks' - so, if you have an older page that has inbound links from, say, Google search or some web directory, people will get a 404 error - not good for SEO or building traffic, in my experience.
I run a few low-volume (at least for now) sites, and my solution has been to hand-edit the .htaccess file for the site, and add a 301 redirect from the old to the new URL. This is a tedious and error-prone process, so, ideally, it should be handled automatically using some add-in module.
Does anyone know of a module that tracks and maintains URL path changes, and performs automatic 301 redirects to the current correct path? I know about "Search 404" but that's not quite what I'm looking for.
Ideally, a module would keep track of 'hits' on the old URL and, after a configurable time, drop stale paths that haven't been hit (after all, if no one visits an old URL alias in six months, does anyone really care? A manual search or Search 404 module should suffice in that situation.)
Also, I know that you can add a manual URL path alias for the old path(s) using Drupal's built-in modules, but that does not provide 301 "moved permanently" redirection so that the search engines can update their information about the old paths when they update your site.
I think this is a big issue for Drupal and SEO, from a site maintenance standpoint.
Michael Curry
Exodus Development | Drupal and other developer info


try this modules...
I use on all of my sites Path Redirect and Global Redirect.
Global Redirect redirects your visitors coming from node/123 to the corresponding alias - with 301.
Path Redirect allows you to specify your old path and its new target.
unfortunately, no module mentioned tracks if it had to redirect some path. But this is not really needed in my opinion.
Tobias Maier
--
Switch to Firefox! mozilla.com
Steig auf den Firefox um! mozilla-europe.org
Thanks for the pointers. I
Thanks for the pointers. I just installed Global Redirect earlier today (thanks to a mention in another posting) - that's a big help.
The Path Redirect module seems like it's promising.. but I'd like to get away from manual maintenance altogether. For example, if I have a site with Urlify installed, simply changing the node title will trigger a url alias change without the editor noticing. Now you've got a broken link. (Yes, this is a weakness in Urlify, and should be addressed in the Urlify module, by not altering an existing path alias when the user changes the title.)
The real issue for me is that established URLs are precious and should not be discarded lightly, and because Drupal makes it trivial to change a URL (nice feature, really) it makes it easy for site content editors to inadvertently create a 404 error, which is why I'd prefer to see an automatic solution... Manual solutions are prone to failure.
In any case, I agree that the two modules you listed are quite helpful. Thanks again!
Michael Curry
Exodus Development | Drupal and other developer info
pathauto solution
I think you've raised a good point and here's the solution that I've come up with:
If path redirect is installed provide new update option "Make old alias a redirect and create new one". It's not implemented yet, but the idea is there. I think that with some small patches to existing contributed modules your desired situation is achievable.
--
Knaddison Family | mmm Beta Burritos
I agree that would be a nice
I agree that would be a nice addition to pathauto - but what about those who never install or use pathauto? (Just asking...)
Is there a way for path_redirect to detect the changes on every node edit? Seems like this functionality ought to be in path_redirect.
Michael Curry
Exodus Development | Drupal and other developer info
.
That's what it says in the thread Greggles pointed to...! :)
Sounds good to me. Can we get a fix on this module? I tried having a look but at the moment modules are a bit above my weight.
clarify
Can we get a fix on which module?
If your question is pathauto then the answer is "in time." If you contribute a patch then I can review commit it, but if it's up to me then I'll do it when I do it... There are other more pressing problems in pathauto at the moment...See http://groups.drupal.org/paths for details.
Greg
--
Knaddison Family | mmm Beta Burritos
pathauto and path redirect
jjeff found the time to do this so Pathauto now provides an option to "Create new alias. Redirect old alias to new alias". It's pretty awesome.
--
Knaddisons Denver Life | mmm Chipotle Log | The Big Spanish Tour
what speaks against using
what speaks against using pathauto instead of urlify?
Pathauto let you decide if you want to let the old path intact or create a new one.
Tobias Maier - http://www.tobiasmaier.info/
--
Switch to Firefox!
Steig auf den Firefox um!
mozilla.com
Wanted edit-time control of path alias, which urlify provides
I wanted to be able to specify the URL path alias at the time I created (or edited) the node, and at the time I chose Urlify, pathauto did not offer that, so Urlify appealed to me, even with the obvious drawback mentioned earlier (change node title, urlify blindly changes the path alias... breaking the established URL).
While I appreciate the information about pathauto not blowing away previous path aliases, perhaps a discussion of the relative merits of various automatic path alias modules like pathauto or urlify would be better served by starting another topic focused on which is best from a SEO standpoint (or, if there is already such a thread, let's move this to that thread.)
I stand by my assertion that it would be beneficial, from a SEO standpoint, for Drupal (via an add-in module, if necessary) to track and automatically perform 301 redirects from previous node URL aliases to the current one. That may be a can of worms, but it should be doable, and that's why we have computers - to automate repetitive and error-prone tasks.
Michael Curry
Exodus Development | Drupal and other developer info
Thanks and Danke
Exactly what I was looking for! Got a huge robots.txt to prevent too much duplicate content and it works well but 301 is the way to go.
Dankeschön!
__
SEO Tips For Successful Drupal Sites
__
Cape Verde News & Community
My Info Collection
Thanks for the tip
These modules are incredibly useful, thanks for sharing.
Chx recently wrote a patch
Chx recently wrote a patch to path.module that includes this feature: http://drupal.org/node/106094
Sweet!
Man, if Drupal 6 has this feature built in, that would be awesome! From what I read, that patch is for D6, not 4.x or 5, correct?
Michael Curry
Exodus Development | Drupal and other developer info
Cool
While I appreciate the information about pathauto not blowing away previous path aliases, perhaps a discussion of the relative merits of various automatic path alias modules like pathauto or urlify would be better served by starting another topic focused on which is best from a SEO standpoint (or, if there is already such a thread, let's move this to that thread.)
Rohit kapur
Offshore software Development /Outsourcing software Development
IMO...
...pathauto is practically a core module (it will likely never be core). This is the module of choice for this task, no question. Little point debating it really... :)
pathauto vs. urlify
I actually think there are different purposes to the two modules.
Originally I found http://www.cmsproducer.com/urlify-drupal-pathauto-module-alias-title which argues that urlify is far better. I think both are good modules for different situations. See http://knaddison.com/technology/pathauto-and-urlify for details on which situations one makes more sense.
--
Knaddisons Denver Life | mmm Chipotle Log | The Big Spanish Tour
related question: Is there a
related question:
Is there a module or solution that allows to map redirects from a non-drupal site to a drupal site/
Sam Rose
Social Synergy
Blog
redirect/URLs modules
I don't think there is a Drupal module for it, but if there is a pattern to the old site's URLs you can use mod_rewrite to send 301 redirects to the new URLs... or use Pathauto Module rules to recreate the old URLs automatically by giving different sections of the site different content types or taxonomy.
path redirect
Path redirect can do this. You can redirect from any url to a new drupal url.
--
Knaddisons Denver Life | mmm Chipotle Log | The Big Spanish Tour
Search404 module can remedy broken URLs
The Search404 module can be use to point users to a page that has changed it's URL or at east provide a search result of the closest documents with content that matches the clean URL keywords.
In my case, I have configured clean URLs to do a Drupal search using the keywords in the URL, and if only one result is available, redirect to that page. This ensures that if I change the clean URL of a page because of a typo or any other reason, the module can provide useful information to the visitor by doing a search of existing relevant documents.
Granted, this is a lazy/sloppy admin's alternative o running a tight ship with 301 headers etc, but it gets the job done. I have even started using it when I am unable to decide the best document to refer to when writing comments on other sites that I sometimes cook up a URL with keywords in it. For instance, you can read more about my ideas on Drupal configuration and SEO at: http://cmsproducer.com/seo-301-redirects-search-404-drupal
There is no existent page with that URL, but if you click on it, the site will give you a list of the closest matching documents
iDonny Productions: Web CMS and UI/UX Design, Development & Web Standards
Well...
I have to be honest, I use s404 and I'm less than pleased with its performance. Every 404 the site generates incurs a DB query, which is pretty wasteful. The real killer for me is that the search terms are rarely useful.
I know that sounds a bit weird, as obviously it's a nice usability feature, but customerror.module allows a custom 404 page, and I'm thinking of creating one for 404 instead of using search404. There I could include the search form, and probably pre-populate the form with some search terms.
The search404 module often gives me search results for stuff that just isn't there, because the path just doesn't relate specifically enough to the content. For instance, the node "/blog/my-drupal-article" might well contain the words "my drupal article", but does not contain the word blog. This means the search doesn't catch that article, so you get no results. Effectively, this query is just trash.
My vote goes to customerror. Other than that, this issue is fixed in path_redirect.
Web Development in Nottingham, UK by Kineta Systems
You have a point, but search404 does let you ignore words
You can tell search404 to ignore words taken from the path in its queries, so if you manually tell it to exclude blog and event and quote or whatever else you may have pathauto creating for you, it will start to find nodes again.
benjamin, Agaric Design Collective
Search 404 AND Path Redirect
Search 404 alone was somewhat OK for me as a remedy for changed page names -- for users who are both human and diligent. It's also helpful for people who play with URLs to see what's there.
Where Path Redirect rocks my world is ...
I agree that Search 404 isn't perfect, but the results are decent enough and I like that it puts the user on a page that has a search box first and foremost, with the "added bonus" of potentially useful results below. So far it doesn't happen often enough that performance is an issue.
CruiseSavvy.com: cruise information - cruise ship pictures - share your story
yes there is an answer
solution that allows to map redirects from a non-drupal site to a drupal site...
you an use:
htacccess
php
meta headers
javascript
SSI
but you have to set it up manually, if you want to map from a non-drupal site, that is if that site doesn't have a redirect feature itself.