Wildcard (catch all) redirect

  • Unknown's avatar

    Hello,

    Is it possible to create a 301 wildcard redirect? I want users who land on ryersonurbanfarm.wordpress.com (and any of it’s child pages) to be pointed to a new URL.

    The blog I need help with is: (visible only to logged in users)

  • Hi there,

    The Site Redirect upgrade will redirect any traffic to any page on your WordPress.com site to the site you specify, yes.

    Site Redirect

  • Unknown's avatar

    Thank you, I was confused about this part of the instructions:

    “Please note: In order for the Site Redirect to work correctly, the permalinks on the new site (the one you’re redirecting to) should match those at WordPress.com. WordPress.com uses the following permalink structure..”

    Can you clarify what that means?

  • Hi there,

    Permalinks are the permanent URLs to your individual posts and pages. WordPress.com uses the following structure (year/month/day/post-name/):

    http://example.com/2014/10/21/sample-post/

    If the site you’re redirecting your WordPress.com site to uses a different permalink structure your visitors may see an error message.

  • Unknown's avatar

    I was able to set up the redirect for the homepage, but how do I capture all the child pages?

  • The site redirect already redirects all the pages on your WordPress.com site.

    In other words, all posts, pages, archive links, etc, on ryersonurbanfarm.wordpress.com should now be redirecting to http://www.ryerson.ca/university-business-services/urban-farm/, as you specified.

    I’m being correctly redirected for all pages I try to visit on your WordPress.com site.

  • Some pages are giving a 404 error on the other site because you don’t follow the same URL structure on that site, as explained in the site redirect support page.

  • Unknown's avatar

    Yes, I was wondering about that.

    My initial question was if a wildcard redirect could be done so that the parent page (and all child pages) could be redirected to a new page… now I’m hearing that’s not actually possible?

  • It’s possible we’re referring to different things, but usually a wild card redirect means you take

    olddomain.com/* (where the * is a wild card and stands for anything)

    and redirect to

    newdomain.com/* (where this matches whatever was on the old URL)

    The site redirect upgrade does this for you.

    It does not redirect from olddomain.com/something to newdomain.com/somethingelse, so it wouldn’t redirect several pages to one page.

    Is the new site you’re working with here on our servers?

  • Unknown's avatar

    The new site is not on your servers.

    What I’m trying to do is:

    olddomain.com/* (where the * is a wild card and stands for anything)

    and redirect to

    newdomain.com

    So that everything under the old domains redirects to a single page (the landing page) on the new domain.

  • I wouldn’t recommend redirecting *everything* back to the main domain, because it will break your existing SEO.

    But if, as you suggested, there’s something like olddomain.com/parentpage/* where you would like to redirect all of that and the parent page to something else, your host may be able to help you with a redirect from olddomain.com/parentpage/* to a specific page. With many hosts this is done with .htaccess and a 301 redirect match, but how it’s done will depend on your host.

    Good luck!

  • The topic ‘Wildcard (catch all) redirect’ is closed to new replies.