# Photography Domain Invalid as Website on Profile

**URL:** https://meta.discourse.org/t/photography-domain-invalid-as-website-on-profile/76319
**Category:** Support
**Created:** [December 18, 2017, 2:53pm UTC](https://meta.discourse.org/t/photography-domain-invalid-as-website-on-profile/76319 "2017-12-18T14:53:23Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Splitterside](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/splitterside/32/120451_2.png) [@Splitterside](https://meta.discourse.org/u/Splitterside)
#### Post date: [December 18, 2017, 2:53pm UTC](https://meta.discourse.org/t/photography-domain-invalid-as-website-on-profile/76319/1 "2017-12-18T14:53:23Z")

</div>

Hi,

I help run a large photography community and several of our members are trying to use the .photography domain for their website list in their profile, but receive a message saying the website is invalid. The format that is being attempted looks like this.

```
http://www.example.photography

```

But this is the error message that is received.

 ![](https://global.discourse-cdn.com/meta/original/3X/6/9/69ab750a299d7b186b9da41677eeec23294582c6.png)

I’ve looked for a setting or something that would allow this type of domain, but I couldn’t find anything. How could support be added for the .photography domain?

Thanks,  
-Adam

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [December 18, 2017, 7:50pm UTC](https://meta.discourse.org/t/photography-domain-invalid-as-website-on-profile/76319/2 "2017-12-18T19:50:52Z")

</div>

@tgxworld is this a spot where your mini suffix gem is missing?

---

<div class="post-metadata">

### Author: ![Splitterside](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/splitterside/32/120451_2.png) [@Splitterside](https://meta.discourse.org/u/Splitterside)
#### Post date: [December 19, 2017, 3:14pm UTC](https://meta.discourse.org/t/photography-domain-invalid-as-website-on-profile/76319/3 "2017-12-19T15:14:12Z")

</div>

Hi @sam, thanks for the response. I am guessing by your reply @tgxworld is the person that knows the answer to my question, correct? Thanks for the help you all can provide.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [December 20, 2017, 6:55am UTC](https://meta.discourse.org/t/photography-domain-invalid-as-website-on-profile/76319/5 "2017-12-20T06:55:24Z")

</div>

If the risk is low and the code already exists to do this, we should get it in for 1.9.

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [December 20, 2017, 7:01am UTC](https://meta.discourse.org/t/photography-domain-invalid-as-website-on-profile/76319/6 "2017-12-20T07:01:25Z")

</div>

What do you have configured for `user website domains whitelist` in your site settings? That validation you ran into is only activate if `user website domains whitelist` is configured.

---

<div class="post-metadata">

### Author: ![Splitterside](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/splitterside/32/120451_2.png) [@Splitterside](https://meta.discourse.org/u/Splitterside)
#### Post date: [December 20, 2017, 2:07pm UTC](https://meta.discourse.org/t/photography-domain-invalid-as-website-on-profile/76319/7 "2017-12-20T14:07:27Z")

</div>

> [@tgxworld](#):
>
> What do you have configured for user website domains whitelist in your site settings? That validation you ran into is only activate if user website domains whitelist is configured.

There is nothing in that field. See below:

 ![image](https://global.discourse-cdn.com/meta/original/3X/0/3/03344d39f994e3f36dae2e0051de4b8d29b213ff.png)

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [December 20, 2017, 2:19pm UTC](https://meta.discourse.org/t/photography-domain-invalid-as-website-on-profile/76319/8 "2017-12-20T14:19:05Z")

</div>

Can you run the following commands for me just to confirm 🙂

```plaintext
./launcher enter app
bundle exec rails console
> SiteSetting.user_website_domains_whitelist

```

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [December 20, 2017, 3:16pm UTC](https://meta.discourse.org/t/photography-domain-invalid-as-website-on-profile/76319/9 "2017-12-20T15:16:12Z")

</div>

It’s empty.

Please note that this instance is on 1.8.10 stable (hosted with us)

@Splitterside if it turns out that the version has something to do with it, we can upgrade you to 1.9 latest beta if you want to.

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [December 20, 2017, 3:28pm UTC](https://meta.discourse.org/t/photography-domain-invalid-as-website-on-profile/76319/10 "2017-12-20T15:28:13Z")

</div>

Hmm this is abit of a mystery to me..

The only place that code is called

> <https://github.com/discourse/discourse/blob/v1.8.10/app/models/user_profile.rb#L107-L113>

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [December 20, 2017, 3:29pm UTC](https://meta.discourse.org/t/photography-domain-invalid-as-website-on-profile/76319/11 "2017-12-20T15:29:48Z")

</div>

I believe they need this commit:

> [@User Preference 'Website' does not allow new TLDs](https://meta.discourse.org/t/user-preference-website-does-not-allow-new-tlds/49931/13):
>
> Had to fix the regexp as it was allowing “http://https://google.com” [https://github.com/discourse/discourse/commit/e43799134c03d0180ef64dc941f61c26f5219314](https://github.com/discourse/discourse/commit/e43799134c03d0180ef64dc941f61c26f5219314)

So, the fix is live on the 1.9.x branch (as always).

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [December 20, 2017, 3:31pm UTC](https://meta.discourse.org/t/photography-domain-invalid-as-website-on-profile/76319/12 "2017-12-20T15:31:34Z")

</div>

Ah thank you!! I totally missed

> <https://github.com/discourse/discourse/blob/main/app/models/user_profile.rb#L10>

---

<div class="post-metadata">

### Author: ![Splitterside](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/splitterside/32/120451_2.png) [@Splitterside](https://meta.discourse.org/u/Splitterside)
#### Post date: [December 20, 2017, 3:35pm UTC](https://meta.discourse.org/t/photography-domain-invalid-as-website-on-profile/76319/13 "2017-12-20T15:35:12Z")

</div>

Thanks everyone for the clarity.

I get that it’s in beta, so there will always be bugs, but are there any major concerns about upgrading to 1.9? Is there an ETA for the release of 1.9?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [December 20, 2017, 3:41pm UTC](https://meta.discourse.org/t/photography-domain-invalid-as-website-on-profile/76319/14 "2017-12-20T15:41:43Z")

</div>

> [@Splitterside](#):
>
> Is there an ETA for the release of 1.9?

It’s coming this year, so it’s very soon!

@tgxworld should we move this validation to your new gem ? Sounds like a good idea.

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [December 20, 2017, 3:42pm UTC](https://meta.discourse.org/t/photography-domain-invalid-as-website-on-profile/76319/15 "2017-12-20T15:42:21Z")

</div>

Yea should be pretty low risk so I’ll give it a crack tml.

---

<div class="post-metadata">

### Author: ![Splitterside](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/splitterside/32/120451_2.png) [@Splitterside](https://meta.discourse.org/u/Splitterside)
#### Post date: [December 20, 2017, 4:11pm UTC](https://meta.discourse.org/t/photography-domain-invalid-as-website-on-profile/76319/16 "2017-12-20T16:11:14Z")

</div>

> [@Falco](#):
>
> It’s coming this year, so it’s very soon!

Thanks @Falco for the quick answer.

@RGJ I am not sure that we want to update to the beta until it is released since it sounds like it is around the corner. Would it be possible to mark our account to be updated once it is released? Thanks.

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [December 20, 2017, 4:34pm UTC](https://meta.discourse.org/t/photography-domain-invalid-as-website-on-profile/76319/17 "2017-12-20T16:34:20Z")

</div>

> [@Splitterside](#):
>
> Would it be possible to mark our account to be updated once it is released

We were going to do that anyway 🙂

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [December 21, 2017, 6:03am UTC](https://meta.discourse.org/t/photography-domain-invalid-as-website-on-profile/76319/18 "2017-12-21T06:03:19Z")

</div>

OK so I had a look through the previous commits and realized that what we initially wanted to do is to [validate the **format** of the URL](https://meta.discourse.org/t/url-validation-for-web-site-on-user-profile/38864/5). That means that there is no need for us to care about whether the URL would return a valid HTTP response as that would require a different solution if we wanted to verify that.

However, I did noticed that our `UrlValidator` wasn’t handling a bunch of cases properly and that has been fixed in

[https://github.com/discourse/discourse/commit/6ecf37c482603cba27510e41723fdd1909d0a135](https://github.com/discourse/discourse/commit/6ecf37c482603cba27510e41723fdd1909d0a135)

I’ve also switched the validation for `UserProfile#website` to use our `UrlValidator` which removes the Regexp that has been quite problematic for us

[https://meta.discourse.org/t/cannot-update-preferences-website-is-invalid/39162](https://meta.discourse.org/t/cannot-update-preferences-website-is-invalid/39162)

> [@User website preference is invalid with underscore](https://meta.discourse.org/t/user-website-preference-is-invalid-with-underscore/41784/6):
>
> And what about IDNs? The regular expression validating the website url is so strict that I can’t fit in my perfectly valid URL [https://ondřej.caletka.cz](https://xn--ondej-kcb.caletka.cz) Even using Punycode form of [https://ondřej.caletka.cz](https://xn--ondej-kcb.caletka.cz) is not accepted, even though it is perfectly valid here in this very forum post.

> [@User Preference 'Website' does not allow new TLDs](https://meta.discourse.org/t/user-preference-website-does-not-allow-new-tlds/49931):
>
> Even though Discourse is hosted on my new TLD domain ‘jamesnorth.productions’, it will not allow the website ‘[http://jamesnorth.productions](http://jamesnorth.productions)’ in the user preferences. It says that the website is invalid. Version v1.7.0.beta3 +100

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [December 21, 2017, 6:27am UTC](https://meta.discourse.org/t/photography-domain-invalid-as-website-on-profile/76319/19 "2017-12-21T06:27:36Z")

</div>

Do we also want to treat non-ascii URLs, like [http://見.香港/](http://xn--nw2a.xn--j6w193g/), as valid?

[https://github.com/discourse/discourse/pull/5451](https://github.com/discourse/discourse/pull/5451)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [December 21, 2017, 6:45am UTC](https://meta.discourse.org/t/photography-domain-invalid-as-website-on-profile/76319/20 "2017-12-21T06:45:26Z")

</div>

I guess we should, it seems to work in the browser.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [February 27, 2020, 3:01pm UTC](https://meta.discourse.org/t/photography-domain-invalid-as-website-on-profile/76319/21 "2020-02-27T15:01:31Z")

</div>



[Next page](https://meta.discourse.org/t/photography-domain-invalid-as-website-on-profile/76319.md?page=2)
