Solved

Need help with re-structuring my URL for SEO

Posted on 2008-11-02
13
307 Views
Last Modified: 2012-05-05
Hi...
I am wanting change my current URL structure of my website from:

http://www.mydomainname.com

to:
http://www.mydomainname.com/foldername

I am obviously doing this because I want to add keyword(s) for SEO purposes.

I have already modified the htaccess file to redirect 301  - http://mydomainname.com to http://www.mydomainname.com
I was able to mod the htaccess file from a posting that I found on the web...personally...I have NO skill or understanding how to write this entry on my own....

Anyway, can anyone show me how to mod the htaccess file to point the default index.htm file to a sub-folder I created on the web-server? I am not even sure I am asking this question correctly....

Thanks,
Matt
0
Comment
Question by:Matt_Mercurio
  • 7
  • 6
13 Comments
 
LVL 12

Expert Comment

by:ShaneJones
ID: 22865346
Sure thing, add the following code to your htaccess file

This will redirect http://www.domain.com/index.html to http://www.domain.com/

and http://www.domain.com/folder/index.html to http://www.domain.com/folder/

and so on!



RewriteEngine On

RewriteCond %{THE_REQUEST} /index\.html [NC]

RewriteRule ^(.*/)?index\.html$ /$1 [R=301,L]

Open in new window

0
 
LVL 12

Expert Comment

by:ShaneJones
ID: 22865351
oh I have this live on my site, you can test it here http://www.shanedj.com/index.php and here http://www.shanedj.com/blog/index.php

I have php files on my site and have modified the above code for you html versions
0
 

Author Comment

by:Matt_Mercurio
ID: 22866390
Thanks Shane...

One question...where exactly do I change your code to reflect my "myfoldername/index.htm"?

Thanks,
Matt
0
 
LVL 12

Expert Comment

by:ShaneJones
ID: 22866417
it automatically works on folders and sub folders. see my example above that shows the blog folder on my site.

That code that I posted is running on my site.

Apply the code to your sites htaccess and try the folders with index.html they will redirect to the root.

Shane
0
 

Author Comment

by:Matt_Mercurio
ID: 22866495
oh ok...wait a sec...I think I am asking the question wrong then...

Here is what I want to do...

When someone types my address in their web browser:
www.domainname.com

I want it automatically to go to:

www.domainname.com/foldername.

I have created the sub folder and I have already placed all the necessary files within it...

Thanks,
Matt
0
 
LVL 12

Expert Comment

by:ShaneJones
ID: 22866550
In your htaccess

Redirect 301 www.domain.com/ "http://www.domain.com/folder/"

I would also recommend putting them other lines in your htaccess too

Shane
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:Matt_Mercurio
ID: 22866658
I am sorry to be a pain Shane...I must be doing something wrong....

I put that line in my htaccess file exactly as you have it written and it is still not working....

I type in my sites addy and it keeps taking me to: http://www.domainname.com without the "foldername."

What I am trying to accomplish is placing my keyword in the URL so the search engines will judge me accordingly. For example, http://www.domainname.com/keyword

Thanks again,
Matt
0
 
LVL 12

Accepted Solution

by:
ShaneJones earned 500 total points
ID: 22866725
I see what you are trying to although I wouldn't get too hung up about redirecting your homepage away.

I am an SEO Professional and what you are doing will not make a difference. It would be more powerful if you had the keyword in your Title, H1 supporting h2 to h6 where necessary, meta description and to cover all bases the meta keywords. Also include about 250+ words of text on the page that is about the keyword.

The homepage is yoru most important page. Redirecting away from it is not advisable in my eyes. From an SEO perspective

From an Apache perspective you need this code

Redirect 301 /index.html "http://www.domain.com/folder/"

have just tested this and it work redirecting from www.domain.com

Shane
0
 
LVL 12

Expert Comment

by:ShaneJones
ID: 22867316
Hi Matt,

Did this solution work for you?

Shane
0
 

Author Comment

by:Matt_Mercurio
ID: 22871964
Sorry Shane...I have been away from my PC since early this morning...I've been in meetings allllllllllllllllllllll daaaaaaaaaaaaaaaaay   urghhhhhh

anyway, let me get at the solution you provided.....stand by I will test later tonight and get back to you...

Again Thanks!
Matt
0
 

Author Comment

by:Matt_Mercurio
ID: 22875745
Shane...it worked! Thank you!

one last question...you said earlier that putting the keyword in the url structure would not make that much difference and that it is better to sprinkle it throughout the title, h1, h2, meta data, etc...and I realize that it may not yeild much in terms of positioning....however, does it have any NEGATIVE  impact? if not, then why not go ahead and put it in the url in addition to all the normal placements?

Thanks again,
Matt
0
 
LVL 12

Expert Comment

by:ShaneJones
ID: 22875936
Glad to see it worked for you. You can close the question and add the correct answer to the knowledge base

Not sure about a negative impact but your homepage domain.com for instance is your most powerful page. Redirecting away is not advised really. On deeper pages and folder structures it is advisable to include the keyword yes a keywordeed folder name is better than a random folder name. But I am against redirecting away from the homepage.

If you have any more questions you can ask them in the SEO section :) I'll be glad to help and am normally on this all day.

Cheers

Shane
0
 

Author Closing Comment

by:Matt_Mercurio
ID: 31512561
Thank you!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

A step by step SEO guide to creating content that drives traffic and maximizes page views by using the right tricks, tools and keyword analysis. You are the subject matter expert.   You have forgotten more about your area of expertise than most …
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now