Forum Moderators: open

Message Too Old, No Replies

Page redirect:: which method you recommend

Updated website, and want to change url that search engines detect

         

mfox

11:23 pm on Nov 21, 2009 (gmt 0)

10+ Year Member



Dear all,

My problem relates to my new website and search engines.
I've updated a website from a previous designed ( last done 5 years ago ).

In google, bing etc, when i type my company name, the engine comes up with "www.#*$!xx.com/main.htm" which is a htm file from the old website.

I would like to get rid of the main.htm and have the search engine pick: "www.#*$!xx.com" or "www.#*$!xx.com/index.html".

Should I
1. make a copy of my index.html and label it main.htm?
2. just don't have a main.htm and wait a month for the search engines to update the missing link.
3. do a page redirect

I would like something long term, and think opt 2 is the best, but may lose traffic for a while. I think opt 1 is not ideal as its just addressing the main problem.

Many thanks in advance.
MFox

jdMorgan

12:33 am on Nov 22, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Long-term:

Declare /index.html as the DirectoryIndex file.

301-permanently redirect only direct client requests for /index.html and *any* requests for /main.htm to www.example.com/
(It is necessary to detect direct client requests for /index.html and to redirect only those in order to prevent a potential infinite loop after the DirectoryIndex function internally rewrites requests for "/" to /index.html.)

How you do this depends on your server type and your coding preferences.

Jim

mfox

1:35 am on Nov 22, 2009 (gmt 0)

10+ Year Member



Thanks jD for putting me in the right direction.
I've learnt about htaccess 301 redirect.
Unfortunately my hosting service wont let me upload .htaccess files ( it keeps deleting them, even if I upload and do a rename).
Ill call them on the weekdays and maybe they can afford me access.
Cheers
Mfox

sevamaster

10:23 pm on Nov 22, 2009 (gmt 0)

10+ Year Member



Only 301 redirect. Using others, you risk to loose traffic

jdMorgan

11:30 pm on Nov 22, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's quite possible that rather than 'deleting' your .htaccess files, the server is simply configured to hide system files (such as those that start with a period like .htaccess and .htpasswd) by default.

If this is the case, use an FTP client that can be set to show system files -- often by allowing you to re-define the "directory listing" command ("ls") to "ls -al", which shows everything.

The open-source FileZilla and many other FTP clients can do this.

Jim

mfox

8:19 am on Nov 24, 2009 (gmt 0)

10+ Year Member



Thank jdMorgan
Spot on - Ive set Filezilla to show all contents.
Yep the .htaccess file is there but unforunately the redirect is not working. Certain its in the right directory. I'll check again with the web hoster.
Mfox