We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36573
    • 173 Posts
    I’ve built a new site for a client but he had a number of pages of the old site indexed and ranked. I was thinking that using a symlink was the answer. I did try to make this work but the page comes up as a blank template. The page I’m trying to sym is a product categories page and uses a number of chunks and TVs. Not sure if that’s the problem.

    What is your opinion? Whats the best way to redirect an old indexed link to a new one.
      Everything I know I learned on the internet. Saved me thousands in College tuition,
      • 22303 MODX Staff
      • 10,725 Posts
      You want to use Weblinks for redirects from an old URL to a new one, not Symlinks. Symlinks are forwards, not redirects, returning the content of the target resource at the Symlink’s location with any non-empty fields from the Symlink overriding the target Resource fields.
        • 33968
        • 863 Posts
        You could also do this by adding 301-type rewrite rules to your .htaccess file for each url that needs updating. This would avoid cluttering your resource tree and is the method recommended by Google.

        Find this section of your .htaccess file:
        # Rewrite domain.com -> www.domain.com -- used with SEO Strict URLs plugin
        RewriteCond %{HTTP_HOST} .
        RewriteCond %{HTTP_HOST} !^www\.domain\.com [NC]
        RewriteRule (.*) http://www.domain.com/$1 [R=301,L]
        

        And add the following for each page you need to redirect:
        RewriteRule ^old-page-alias$ http://www.domain.com/new-page-alias [R=301,L]
        

        Note the old alias does not include the domain name, and make sure you include the ’$’ sign on the end.

        You’ll probably find that it will take a few days (but possibly over a month) for your new urls to start showing up in search results. Search engines hate stale links more than anyone so the change would eventually get picked up naturally anyway. If you have submitted an XML sitemap to Google then you should make sure it is up to date and resubmit it - that will help a lot.

        You should also check the backlinks to your site and try to get any links to the old pages changed to the new page. Once you’re certain there are no longer any links to your old page out there you can safely remove the rewrite rules.
          • 36573
          • 173 Posts
          Thanks for the information. That exactly what I was looking for.
            Everything I know I learned on the internet. Saved me thousands in College tuition,