<p>You can change your entry's URL format right inside Craft. It's under Settings -&gt; Sections then choose the section you want.</p>
<p><a href="https://i.sstatic.net/96PSp.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/96PSp.png" alt="enter image description here" /></a></p>
<p>Under URL Format, just add <code>.html</code> after the <code>{slug}</code>. In this example, I've also added the year that the entry was added to the URL as well and you can really make it whatever you want.</p>
<p>Using <code>.htaccesss</code> you could also <a href="https://stackoverflow.com/questions/5730092/how-to-remove-html-from-url">remove the <code>.html</code></a> extension from the static pages too if you want to follow Craft's format (though be careful with that one).</p>
<h1>SEO</h1>
<p>As far as whether it's a good idea to do either for SEO purposes, you're going to get a lot of differing opinions. I'm a URL minimalist,  so I tend to keep my URLs simple, including removing <code>www</code> from the hostname and removing any trailing slash from URLs if possible.</p>
<p>Google tends to favor <a href="http://backlinko.com/search-engine-ranking" rel="nofollow noreferrer">short URLs</a> among other things but it's not a big factor.</p>
<p>Content is content. Years ago, I remember there used to be some SEO benefit to adding <code>.html</code> but if search engines can index it, it doesn't matter what the URL is.</p>
<p>The bigger issue for me is any time you change a URL, you risk blowing something up. I'm always reminded of the saying <a href="http://www.w3.org/Provider/Style/URI.html" rel="nofollow noreferrer">Cool URLs don't change</a>.</p>
<p>If your site has been around awhile,  I wouldn't mess with them. Other people may be linking to your pages and if you change the URLs, you'll want to put in 301 redirects—otherwise they'll 404, which is a much bigger problem.</p>

CC BY-SA 3.0
2016-06-21T15:26:58.943Z
2016-06-21T15:26:58.943Z
2020-06-17T08:56:27.903Z
RitterKnight
<p>I am currently using Craft to manage only certain pages on a site. The static pages all end in <code>.html</code> but Craft's pages don't. Is there a way to rewrite them via Craft to add <code>.html</code> or do I have to do some <code>.htaccess</code> wizardry? I only want to rewrite the pages and not the categories (for example, /news/).</p>

<p>If I can achieve this, should I? Are there enough SEO benefits to a consistent URL format? I've also read using <code>.htaccess</code> in this way may affect SEO negatively, which is why I'm wondering if there's a way of doing it with Craft.</p>

<entries><url>
Adding .html to end of page url?
# Adding .html to end of page url?

(Asked by: username_0 on 2016-06-21)

I am currently using Craft to manage only certain pages on a site. The static pages all end in `.html` but Craft's pages don't. Is there a way to rewrite them via Craft to add `.html` or do I have to do some `.htaccess` wizardry? I only want to rewrite the pages and not the categories (for example, /news/).

If I can achieve this, should I? Are there enough SEO benefits to a consistent URL format? I've also read using `.htaccess` in this way may affect SEO negatively, which is why I'm wondering if there's a way of doing it with Craft.

**Tags:** entries, url

---

## 1 answers

### Answer by username_1 on 2016-06-21. Score: 3 | Accepted answer

You can change your entry's URL format right inside Craft. It's under Settings -> Sections then choose the section you want.

[![enter image description here](https://i.sstatic.net/96PSp.png)](https://i.sstatic.net/96PSp.png)

Under URL Format, just add `.html` after the `{slug}`. In this example, I've also added the year that the entry was added to the URL as well and you can really make it whatever you want.

Using `.htaccesss` you could also [remove the `.html`](https://stackoverflow.com/questions/5730092/how-to-remove-html-from-url) extension from the static pages too if you want to follow Craft's format (though be careful with that one).

# SEO

As far as whether it's a good idea to do either for SEO purposes, you're going to get a lot of differing opinions. I'm a URL minimalist, so I tend to keep my URLs simple, including removing `www` from the hostname and removing any trailing slash from URLs if possible.

Google tends to favor [short URLs](http://backlinko.com/search-engine-ranking) among other things but it's not a big factor.

Content is content. Years ago, I remember there used to be some SEO benefit to adding `.html` but if search engines can index it, it doesn't matter what the URL is.

The bigger issue for me is any time you change a URL, you risk blowing something up. I'm always reminded of the saying [Cool URLs don't change](http://www.w3.org/Provider/Style/URI.html).

If your site has been around awhile, I wouldn't mess with them. Other people may be linking to your pages and if you change the URLs, you'll want to put in 301 redirects—otherwise they'll 404, which is a much bigger problem.


---

