Mobile app version of vmapp.org
Login or Join
Carla537

: How to purge old links in google from an old domain Recently, I uploaded a new site to an existing domain and I'd like to figure out how I can forward all links to said domain to a new

@Carla537

Posted in: #SearchEngines #Seo #Wordpress

Recently, I uploaded a new site to an existing domain and I'd like to figure out how I can forward all links to said domain to a new domain.

I'm looking for a wordpress solution if possible, but in the end I I seem myself writing a small header script that I will paste into ever directory's index file saying header('Location:http://xxx.yyy.zzz')

Is there a cleaner way to do this without having to resort to managing the whole file structure?

No, I do not have access to the apache runtime. Unfortunately it is a shared-host server.

Thanks in advance.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Carla537

1 Comments

Sorted by latest first Latest Oldest Best

 

@Pope3001725

You need to do 301 redirects from the old URLs to the new URLs. If all you did was change the domain name then this will work for you (place this in a file called .htaccess in your root web directory):

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) www.newdomain.com/ [R=301,L]


If the domain is the same you'll need to do 301 redirects for each page. If the new URLs follow a pattern related to old URLs you can do this all with one rule like above but how that is done will depend on the URLs. If there is no pattern you can do them all one at a time using the same technique as above:

redirect 301 /old/old.htm www.you.com/new.htm

Just write that line in your .htaccess file for each page you wish to redirect.

I'd leave the .htaccess file in place for all long as you have the website. That way anyone who still comes across an old URL will be able to find the new one easily and transparently.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme