Design of website & it's SEO impact

Discussion in 'HTML & Website Design' started by hzzg6y, Nov 11, 2013.

  1. #1
    Hi,

    I need advice on how to deal with it. I have one big website named www.example.com having a database with many URL's such as www.example.com/delhi.php, www.example.com/newyork.php etc. Now I have created two more domains pointing to same sourcecode & same database as www.example.com i.e. www.example1.com
    & www.example2.com.... I don't want www.example1.com/delhi.php should be crawled by google so that I do not get penalized for SEO & google ranking. Please advice.

    I am looking for solution such as if the current URL is www.example1.com then www.example1.com/delhi.php is not crawable by google or blocked for google. I am not
    sure whether this can be done via robots.txt or .htaccess.

    Rgds
     
    hzzg6y, Nov 11, 2013 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,816
    Likes Received:
    4,536
    Best Answers:
    123
    Trophy Points:
    665
    #2
    You just need a site id in the database tables so that when the pages are created they know whether the content is available on example, example1, and example2

    I'm not sure why you are using the same database though.

    How is your system meant to know which content to serve?

    Oh, and you don't want it in your .htaccess or the file will become a maintenance nightmare.
     
    sarahk, Nov 11, 2013 IP
  3. hzzg6y

    hzzg6y Greenhorn

    Messages:
    38
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #3
    Same database is required & content need to shared with all the three sites... Content need to shared with each URL based on current URL the user is ? I mean based on what URL is user visited, he need to shared the content of site. Say we have delhi.php file which need to be available only for www.example.com hence delhi.php should not be accessible or available for www.example1.com or www.example2.com. I mean google SEO should be mapping delhi.php to example1.com or example2.com... Please help / Advice. I am fine to do this via .htaccess but not sure how to do this.

    Apologies If I have posted this in incorrect forum thread.
     
    hzzg6y, Nov 11, 2013 IP
  4. sarahk

    sarahk iTamer Staff

    Messages:
    28,816
    Likes Received:
    4,536
    Best Answers:
    123
    Trophy Points:
    665
    #4
    It's really simple.

    Lets say you have a database table called cities.
    It might have columns: id, site_id, page_name, title, excerpt, body

    Then when a user goes to one of your sites and requests the home page it will query the table cities for all cities with the right site_id and return that list to be used in the menu etc.
    When google requests a site map for one of the sites it builds it based on the cities for that site_id.

    When your admin person adds a new city through the admin system they just need to select the right site for the city - you just add a drop down to the edit form.
     
    sarahk, Nov 11, 2013 IP
  5. hzzg6y

    hzzg6y Greenhorn

    Messages:
    38
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #5
    I guess you are not getting my point. Say I have delhi.php file in /html root folder. www.example.com/delhi.php is working fine however I don't want www.example1.com/delhi.php to be NOT accessible or not existance ... How to acheive this. I mean delhi.php should not be mapped for www.example1.com URL...
     
    hzzg6y, Nov 11, 2013 IP
  6. sarahk

    sarahk iTamer Staff

    Messages:
    28,816
    Likes Received:
    4,536
    Best Answers:
    123
    Trophy Points:
    665
    #6
    Then in your setup script detect if the page requested is valid for the domain and if it isn't redirect to your 404 page

    You know if it's valid because you query the database and compare the site_id with the page name
     
    sarahk, Nov 12, 2013 IP
  7. hzzg6y

    hzzg6y Greenhorn

    Messages:
    38
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #7
    My objective is that www.example1.com & www.example2.com domain should also get promoted for SEO. If I make it as 404, then SEO will get impacted for domain www.example1.com & www.example2.com ... Google should treat this domain www.example1.com & www.example2.com as seperate domain with specific ranking for specific keywords.
     
    hzzg6y, Nov 12, 2013 IP
  8. sarahk

    sarahk iTamer Staff

    Messages:
    28,816
    Likes Received:
    4,536
    Best Answers:
    123
    Trophy Points:
    665
    #8
    But google isn't ever going to ask for them since they aren't in your xml sitemap and have to internal links to those pages.

    your site can have 404's and be unharmed - google actually asks for pages you don't have just to check how you handle 404s
     
    sarahk, Nov 12, 2013 IP
  9. hzzg6y

    hzzg6y Greenhorn

    Messages:
    38
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #9
    I am worried about google crawler. Yes I agree that I can control by submitting correct sitemap.xml file however crawler get the additional pages....

    Thanks you very much for all the inputs. You have been really great to reply my threads..
     
    hzzg6y, Nov 12, 2013 IP