<p>In your config file you will want to define the locales such that <code>en</code> points to the root directory.</p>

<pre><code>'siteUrl' =&gt; array(
    'en' =&gt; 'http://craft.dev/',
    'cy' =&gt; 'http://craft.dev/cy/'
 ),
</code></pre>

<p>And your public <code>html</code> folder should not include an 'en' folder:</p>

<pre><code>/craft
/html
    /cy
        /.htaccess
        /index.php
    /.htaccess
    /index.php
</code></pre>

CC BY-SA 3.0
2014-10-14T08:16:37.017Z
Worked like a charm, thanks - I'd tried this before but neglected to remove the /en directory!
Matt Wilcox
CC BY-SA 3.0
2014-10-13T18:23:25.013Z
2014-10-13T18:23:25.013Z
Douglas McDonald
<p>My bilingual site works fine, but it is not optimal from a url and SEO perspective because Craft is outputting duplicate content on different paths.</p>

<p>My default locale is <code>en</code> and the secondary locale is <code>cy</code>, this means many English pages can be reached by omitting the local from the path (which is the behaviour I want).</p>

<p>The problem is that certain pages craft generates via the <code>{{ entry.url }}</code> parameter contains the locale in the path even for the default one. i.e., Craft is spitting out paths like <code>http://mysite.com/en/section/entry-title</code> when I'd prefer it to be <code>http://mysite.com/section/entry-title</code>. It's actually accessible from both URLs, which is a bad thing for SEO. I only want the locale parameter added into the path when it's actually needed (i.e., for when we switch to cy).</p>

<p>Is this possible? If not, is there a work-around?</p>

CC BY-SA 3.0
2014-10-13T16:50:05.490Z
Do you have a folder `en/` in your root directory, Matt?
carlcs
CC BY-SA 3.0
2014-10-13T16:56:26.530Z
Did you double check that section's entry URL format?
carlcs
CC BY-SA 3.0
2014-10-14T12:07:19.150Z
Good to hear that removing the `en/` folder did the trick!
carlcs
<entries><routes>
Can craft omit default locales from generated paths?
# Can craft omit default locales from generated paths?

(Asked by: username_0 on 2014-10-13)

My bilingual site works fine, but it is not optimal from a url and SEO perspective because Craft is outputting duplicate content on different paths.

My default locale is `en` and the secondary locale is `cy`, this means many English pages can be reached by omitting the local from the path (which is the behaviour I want).

The problem is that certain pages craft generates via the `{{ entry.url }}` parameter contains the locale in the path even for the default one. i.e., Craft is spitting out paths like `http://mysite.com/en/section/entry-title` when I'd prefer it to be `http://mysite.com/section/entry-title`. It's actually accessible from both URLs, which is a bad thing for SEO. I only want the locale parameter added into the path when it's actually needed (i.e., for when we switch to cy).

Is this possible? If not, is there a work-around?

**Tags:** entries, routes

> **Comments:**
> **username_1**: Do you have a folder `en/` in your root directory, Matt?  
> **username_1**: Did you double check that section's entry URL format?  
> **username_1**: Good to hear that removing the `en/` folder did the trick!  

---

## 1 answers

### Answer by username_2 on 2014-10-13. Score: 1 | Accepted answer

In your config file you will want to define the locales such that en points to the root directory.
'siteUrl' => array(
    'en' => 'http://craft.dev/',
    'cy' => 'http://craft.dev/cy/'
 ),

And your public html folder should not include an 'en' folder:
/craft
/html
    /cy
        /.htaccess
        /index.php
    /.htaccess
    /index.php

> **Comments:**
> **username_0**: Worked like a charm, thanks - I'd tried this before but neglected to remove the /en directory!  

---

