I have just started re-designing my website and since I don’t know php (yet) and don’t use the CMS system, most of my work is done manually. That is fine and enough for the purpose of my sites for now (news will be added via built-in blog) but I have a problem with changing the names of my sub-pages.
I hear that I should use a re-direct 301 but tbh I have never done it so can someone advise if that’s what I need here?
Basically, I’m changing sites from, eg. http://www.mysite.com/i-like-you.html to http://www.mysite.com/ilikeyou.html
So should I keep the other site on server and just re-write it with re-direct script? Or should I create that htaccess file and it will re-direct all invalid subpages to the main page for me? (I would like that!)
Hope you can help! Thanks :hattip::hattip:
You will want to use a htaccess to accomplish this rather than a redirect because you are (seemingly) redirecting the entire site starting with what I am guessing is your primary subdirectory.
You could use 301’s, but you would want need to do it on each page.
Also be sure to use the canonicalisation feature to assign one primary domain to preserve link juice. You can read more about that here; Canonicalisation
Why is it that you are doing this anyways? The removal of the dashes will not provide any added SEO element to the URL structure?
Gary
Thanks for replying!
It’s not the whole site, it’s some sub-directories. The dashes were just an example – I want to change the title of sub-pages from for example main.html to livedealers.html etc.
Will htaccess also handle the wrong spelling of my sites? Or any old sub-pages that I might have changed in the past?
Thanks,
livegirl ” title=”” class=”bbcode_smiley” />
Thanks for replying!
It’s not the whole site, it’s some sub-directories. The dashes were just an example – I want to change the title of sub-pages from for example main.html to livedealers.html etc.
Will htaccess also handle the wrong spelling of my sites? Or any old sub-pages that I might have changed in the past?
Thanks,
livegirl ” title=”” class=”bbcode_smiley” />
Hi Livegirl1,
The .htaccess file is a text file which resides in your main site directory and/or in any subdirectory of your main directory. There can be just one, there can be a separate one in each directory or you may find or create one just in a specific directory.
Any commands in a .htaccess file will affect both the directory it is in and any subdirectories of that directory. Thus if you have just one, in your main directory, it will affect your whole site. If you place one in a subdirectory it will affect all the contents of that directory.
You could use a redirect meta tag in the head of the old pages to bring users to the new ones, but some search engines may not follow the redirect and others frown upon it.
Here’s how to do it;
Enter this line in your .htaccess file:
Redirect permanent /oldfile.html http://www.domain.com/filename.html
You can repeat that line for each file you need to redirect. Remember to include the directory name if the file is in a directory other than the root directory:
Redirect permanent /olddirectory/oldfile.html http://www.domain.com/newdirectory/newfile.html
(this is wrapping here but needs to be on a single line)
If you have just renamed a directory you can use just the directory name:
Redirect permanent /olddirectory http://www.domain.com/newdirectory
If you have backlinks to your site this will also fix this issue, and any future issues.
Yes and yes to your last 2 questions,
Want some free SEO??
Put me there for 2 weeks and I;ll have you top 3 before you give me the return flight tickets!
Gary
just read your blog after discovering it through this thread.
had to post that i was fascinated. first time i’ve read about seo thats not written in such an esoteric way it all becomes to hard.
cheers
just read your blog after discovering it through this thread.
had to post that i was fascinated. first time i’ve read about seo thats not written in such an esoteric way it all becomes to hard.
cheers
Thanks faststeady,
I try to keep things in laymans terms as much as possible but sometimes that’s the real challenge. Were you referring to ppc-managers.blogspot.com or garythescubaguy.com?
Thanks again. That makes it worth continuing to do. Cheers!
will be definately giving you a hollow in the near future if you dont mind when kundans finished my latest project design to ensure i plan it out properly at the start ” title=”” class=”bbcode_smiley” />
cheers
Want some free SEO??
Put me there for 2 weeks and I;ll have you top 3 before you give me the return flight tickets!
Gary
hahaha ok!
where do i have to fly you from? ” title=”” class=”bbcode_smiley” />
I’ll be in Cancun and Holland for the next 6 weeks though for CAP Spring Break and CAP/A4U & the CAC conferences. June my son and sister are flying in so May is really the only thing open and I’m in Sweden the last week so anytime between the 1-3rd week of May. :highflyer
Please login or Register to submit your answer