1

I moved some of the content on my website to an external site. However, a lot of places on the Internet still link to the missing pages, resulting in 404 messages. What is the best method of redirecting people to the new and correct Web address in this instance? I don't want to make Google angry at me!

I am using a paid Web hosting provider. They use Apache 2.2.23 and I manage the site using cPanel. It's not really a wiki, but a maths website. Here are two example URLs:

  • https://www.example.org/m/db5zz5uh
  • https://www.example.org/m/mpvsttas

Here's an example of one of the missing pages on my site:

  • http://mywebsite.net/mathematics/several-words-separated-by-hyphens.php

(Note also, there are a few pages I haven't migrated to the other site yet, and still use the old naming scheme.)

I don't see a pattern I can take advantage of. Will probably need to map each URL individually.

  • 1
    If it's about more pages than you can/want to handle, then some conditional redirect patterns can help, but for that to happen, it's required to have the same url 'title' (resource name) in the external pages as you have with your missing page urls. Then it can be made by conditional url matching. Maybe this direction brings you closer: stackoverflow.com/questions/40872730/… – Viktor Borítás Nov 27 '19 at 14:30
1

If you need to change the URL of a page as it is shown in search engine results, use a server-side 301 redirect. This is the best way to ensure that users and search engines are directed to the correct page. The 301 status code means that a page has permanently moved to a new location.

301 redirects are particularly useful in the following circumstances:

You've moved your site to a new domain, and you want to make the transition as seamless as possible. People access your site through several different URLs. If, for example, your home page can be reached in multiple ways - for instance, http://example.com/home, http://home.example.com, or http://www.example.com - it's a good idea to pick one of those URLs as your preferred (canonical) destination, and use 301 redirects to send traffic from the other URLs to your preferred URL. You're merging two websites and want to make sure that links to outdated URLs are redirected to the correct pages. To implement a 301 redirect for websites that are hosted on servers running Apache, you'll need access to your server's .htaccess file. (If you're not sure about your access or your server software, check with your webhoster.) For more information, consult the Apache .htaccess Tutorial and the Apache URL Rewriting Guide. If your site is hosted on a server running other software, check with your hoster for more details.

| improve this answer | |
  • Sorry, I wasn't more specific. But I moved the content (text, applets, images) to the other site, not the pages themselves. I mean, there are a lot of branding, layout and other differences. Also, I don't own the other site. Would a 301 redirect confuse people? – posfan12 Nov 28 '19 at 2:35
  • 1
    The short answer is yes, it would confuse the visitors and it would raise questions about the security of your site and you would send away your site visitors. – Keftef Nov 28 '19 at 14:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.