I have created a WordPress site here -

Hi.

I have created a WordPress site here - http://ashisthakur.in/

I have installed the WordPress in its own directory "ashist" and used this guide here http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Using_a_pre-existing_subdirectory_install to get the main url work as my WordPress address.

Right now the URLs - http://ashisthakur.in and http://ashisthakur.in/ashist/ are same. That is to say there are essentially two home page! So will this be considered as duplicate content/pages or not? Any official document regarding the same please? Also, is this the right way to go about it?

Thanks
Raj

  • Tyler Postle

    Hey Raj,

    Hope you're doing well today and thanks for your question!

    Are you wanting your ashisthakur.in to be the main url or the subdomain to be the main url? If it's the subdomain did you add this code to your .htaccess file inside the root folder? As the instructions mentioned:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^(www.)?YourDomain.com$
    RewriteRule ^(/)?$ blog [L]

    Change "yourdomain" to your actual domain and "blog" to "ashist".

    Then it should automatically redirect the main url to your subdomain one.

    Or are you want the subdomain url to go to your main url?

    In that case, you could try this:

    RedirectMatch 301 ^/blog/$ http://domain.com/

    Hope this helps! Let us know if you need any further assistance here.

    All the best,
    Tyler

    PS. Just curious, but why did you install WordPress it's own directory like this instead of just have it all in the root folder?

  • raj

    Hi Tyler.

    I have added nothing to the .htaccess file and the urls are working as I want them to. These are the only steps I have followed -

    Using a pre-existing subdirectory install
    If you already have WordPress installed in its own folder (e.g., http://example.com/wordpress), then the steps are as follows:

    Go to the General panel.
    In the box for Site address (URL): change the address to the root directory's URL. Example: http://example.com
    Click Save Changes. (Do not worry about the error message and do not try to see your blog at this point! You will probably get a message about file not found.)
    Copy (NOT MOVE!) the index.php and .htaccess files from the WordPress (wordpress in our example) directory into the root directory of your site—the latter is probably named something like www or public_html. The .htaccess file is invisible, so you may have to set your FTP client to show hidden files. If you are not using pretty permalinks, then you may not have a .htaccess file. If you are running WordPress on a Windows (IIS) server and are using pretty permalinks, you'll have a web.config rather than a .htaccess file in your WordPress directory.
    Edit your root directory's index.php.
    Open your root directory's index.php file in a text editor
    Change the line that says:
    require( dirname( __FILE__ ) . '/wp-blog-header.php' );
    to the following, using your directory name for the WordPress core files:
    require( dirname( __FILE__ ) . '/wordpress/wp-blog-header.php' );
    Save the file.
    Login to your site (if you aren't still already). The URL should still be http://example.com/wordpress/wp-admin/

    Don't need anything beyond that I guess and I don't want to redirect anything and as it is a new domain/install/site no issues with previous urls or databases.

    The question I have is there will be same content on these two URLs - http://ashisthakur.in and http://ashisthakur.in/ashist/ Is that an issue? Any official documentation on the same please.

    Thanks

  • Ivan

    Hi Raj,

    Yes the content will be the same, and yes that might be a problem if you want to have good SEO on this domain.

    For this reason I will support Tyler recommend using 301 redirect in your .htaccess file.

    There is no official documentation regarding this matter, as Google and the other search engines do not provide such for SEO.
    But you could check this link - http://moz.com/learn/seo/duplicate-content

    Thanks,
    Ivan

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.