?
Solved

Need help with re-structuring my URL for SEO

Posted on 2008-11-02
13
Medium Priority
?
316 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
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
 

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 2000 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

Optimum High-Definition Video Viewing and Control

The ATEN VM0404HA 4x4 4K HDMI Matrix Switch supports 4K resolutions of UHD (3840 x 2160) and DCI (4096 x 2160) with refresh rates of 30 Hz (4:4:4) and 60 Hz (4:2:0). It is ideal for applications where the routing of 4K digital signals is required.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
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.
Suggested Courses

762 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